CSS for styling SharePoint

Soldato
Joined
1 Feb 2006
Posts
8,188
I am in the process of building a masterpage for SharePoint 2010 and having real trouble getting a solution for the top navigation.

Some of the link labels are rather long (maybe 6 words) and I need to wrap the long links over two lines. Initially I set the <li> to a fixed width of 100px and the text will wrap fine but for short links this is a waste of space.

I need about 9 links on the top bar so I can afford around 100px and no more. Is there any nice tools that I can use to do automatic <li> resizing and wrapping so that I don't have any wastage of space?

This is an example of what I need to achieve:
topnav.jpg


Notice how some menu items are wider than others?
 
Ok, I have an idea... use jQuery to find the space character that is nearest the middle of the link label and then insert a <br />. Is this possible?

Edit: think I have it sorted.
 
Last edited:
Back
Top Bottom