Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using SharePoint Server 2007 x64 and Windows Server 2008 x64. I have setup a site with template publishing portal. I have grant anonymous access to all the site.

I am using top global navigation bar and left side navigation bar. The current issue is, the length of characters of items on the left side navigation bar is short (e.g. I am using some short words, like car, pet, book, etc.), but the width of the left navigation bar is a couple of times width of the length of characters of items on the left side navigation bar, which makes the UI look a little bit ugly.

How to make left navigation bar's width automatically scale according to the width of the length of characters of items on the left side navigation bar? Or some ways to make the left navigation bar's width smaller?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

My first thought here would be to see if you can do this using jQuery if you don't want to go in and create your own custom masterpage. I know that there are several posts on making the left nav accordion style here: http://www.endusersharepoint.com/?s=jquery+for+everyone. You might be able to modify this and use it to affect the styles of the left nav to make it grow or shrink according to the entries.

The only other way I know to do this is to create your own custom master page and deploy it to the site.

share|improve this answer
    
The web site contains many jQuery scripts. Which specific jQuery scripts do you mean? –  George2 Nov 6 '09 at 16:19
1  
start here: endusersharepoint.com/2008/12/03/… and you will probably have to modify the script to make it do what you want. You can apply .css from a javascript within the page if you don't want to modify the master page. You will just need to know what .css classes you need to modify, and how you want them to look. –  Lori Nov 6 '09 at 17:04
    
Thanks Lori, I take time to study the reference page and it is not performing the same task as I did. I also studied default.master and BlueBand.master, as I an new to master/css of WSS, still confused which element do I need to change if I want to change the width of quick launch bar, appreciate if you could let me know which element in master page/css I should modify? –  George2 Nov 7 '09 at 14:30
    
Thanks Lori! Question answered! I have followed your advice and find a way to set the width of left navigation bar to be fixed width value. I met with a new issue, which is about how to make the width of left navigation bar to be automatically changed according to the max length of item (i.e. when the max width of item in left navigation bar is small, I want the left navigation bar to be thinner). Here is my question, appreciate if you could take a look, sharepointoverflow.com/questions/426/… –  George2 Nov 8 '09 at 8:46
add comment

Either jQuery or CSS

share|improve this answer
    
Any more details jQuery or CSS script to use? –  George2 Nov 6 '09 at 16:16
    
Hi Jaap, I have followed your hint and find a way to set the width of left navigation bar to be fixed width value. I met with a new issue, which is about how to make the width of left navigation bar to be automatically changed according to the max length of item (i.e. when the max width of item in left navigation bar is small, I want the left navigation bar to be thinner). Here is my question, appreciate if you could take a look, sharepointoverflow.com/questions/426/… –  George2 Nov 8 '09 at 8:47
add comment

You have to edit the master page respectively the css files of your website to change the look of the left navigation. The master page defines the main look and feel of you website and also includes both navigations controls.

The easiest way to do the editing is via the SharePoint Designer. You then have to open you root website with SharePoint Designer and navigate to the folder _/catalog/masterpage where you find all master pages available for you website.

I suppose you're using the default master page so you should open the file default.master. You will be asked if you want to check out the master for editing. Click yes to go on.

Now you see the HTML code of your master page which you can edit so the left navigation looks like you want it to.

When your ready with editing, save the master page and check it in by right click on the master page file and select "check in". In the next dialog select the option which says publishing as major version. After that you'll be asked if you want to go to the site to approve the new version. You have to do this so everyone can see the changes you made.

share|improve this answer
    
"Now you see the HTML code of your master page which you can edit so the left navigation looks like you want it to." -- I understand this. My question is what specific scripts do I need to modify in master page to achieve my goal -- i.e. "to make left navigation bar's width automatically scale according to the width of the length of characters of items on the left side navigation bar? Or some ways to make the left navigation bar's width smaller"? –  George2 Nov 6 '09 at 16:18
1  
You'll have to have a play with the % width in the css to get that scalability. –  Anonymous Nov 6 '09 at 16:42
    
Cool! "You'll have to have a play with the % width in the css to get that scalability" -- I am new to master page of WSS. Appreciate if you could let me know the % width of which specific element in css do you mean? –  George2 Nov 7 '09 at 14:24
    
Hi Flo, I have followed your hint and find a way to set the width of left navigation bar to be fixed width value. I met with a new issue, which is about how to make the width of left navigation bar to be automatically changed according to the max length of item (i.e. when the max width of item in left navigation bar is small, I want the left navigation bar to be thinner). Here is my question, appreciate if you could take a look, sharepointoverflow.com/questions/426/… –  George2 Nov 8 '09 at 8:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.