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

Got quick and hopefully easy question. It is...How can I add a divider line/section in QuickLaunch on SharePoint 2010? Any suggestions will be greatly appreciated!!!

share|improve this question
add comment

3 Answers

The quick launch menu items are rendered by this template

<LevelMenuItemStyles>
     <asp:menuitemstyle CssClass="ms-navheader" />
     <asp:menuitemstyle CssClass="ms-navitem" />
</LevelMenuItemStyles>
<LevelSubMenuStyles>
     <asp:submenustyle CssClass="ms-navSubMenu1" />
     <asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>
     <asp:menuitemstyle CssClass="ms-selectednavheader" />
     <asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>

See it in Sharepoint:SPNavigationManagertag of v4.master. thus I think that the easiest way is to use CSS

.ms-navitem
{
    border-bottom: [border-width || border-style || border-color] | inherit
}

Also you can modify this markup to insert your html.

share|improve this answer
add comment

As I like @Alexander's asnwer a lot, I'm curious towards what kind of sectioning you're looking for?

If it is level based, then I'd go with Alexanders, but if it's "random", like grouping them this way

Item1  
Item2  
Item3  
__

Item4  
Item5  
__  

Item6

then I'd suggest javascript/jquery. Depending on what you like most.

Example using jQuery:

$('document').ready(function () {
    // Hides text value of QL items containing '-----'
    // then adds class 'MyDivider' which will style the "empty" list item
    $('.s4-ql li.static .menu-item:contains("-----")').hide().parent().addClass('MyDivider');
});

As I said it's only an example :)
This way you can always control where the quicklaunch should divide the menuitems by going to the sites Navigation settings and adding a new link, typing in ----- as the title.

Hope this helps :)

share|improve this answer
add comment

I did this through the interface:

Site Actions > Site Settings > Look and Feel > Navigation

In the 'Navigation Editing and Sorting' section, select the 'Current Navigation' item (which is the Quick Launch bar). Click 'Add Heading', and for the title enter a series of alt-196 keycodes. This keycode will produce a series of connected horizontal lines, like underscores, but vertically centered. Nothing is needed for any of the other fields.

It will put your separator at the bottom, so just uses the 'Move Up' link to get it where you want it. Click 'OK' and check the result.

share|improve this answer
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.