Sharepoint 2013 - Hide left Navigation, but not in People and Groups

19,881

Solution:

Try below css (instead of yours):

.ms-core-sideNavBox-removeLeftMargin { display: none } /* hide only quick links */
#contentBox { margin-left: 0px } /* make content take full page width */

Explaination:

Div with id sideNavBox is the main container of left navigation box. But it is not the actual container that holds the quick links.

SP2013 Left Navigation Element Hierarchy

Actually quick links is contained by another div with class ms-core-sideNavBox-removeLeftMargin which is a child div of div with id sideNavBox.

Now people and groups left panel items are not contained in this div with class ms-core-sideNavBox-removeLeftMargin but is instead contained in div above it with class ms-ql-additionaltopsection (as shown in above image).

So our solution above hides this actual quicklinks containing child div:

.ms-core-sideNavBox-removeLeftMargin { display: none } /* hide only quick links */

instead of parent container

#sideNavBox { display: none } /* hide left navigation box */

You can find my detailed blog on this matter here.

Share:
19,881
Rider
Author by

Rider

Updated on June 26, 2022

Comments

  • Rider
    Rider almost 2 years

    I tried to hide the left Navigation bar and it works without problems. The only problem now is that when I go under: Site settings > User Permissions > People and Groups

    It hides me my Groups I created there on the left side. Is there any possibility of hiding the left navigation bar in all sites and leaving "People and Groups" alone?

    I made my own css file and used this to hide the Navigation bar:

    MyOwnCss.css:

    #sideNavBox { DISPLAY: none }
    #contentBox { margin-left: 0px }
    

    Best regards

    Andrew

  • Rider
    Rider over 10 years
    Thank you so much for your effort! Really great problem solution, Purnil!
  • variable
    variable about 10 years
    .ms-core-sideNavBox-removeLeftMargin { display: none } should also be used to hide the left nav box when suppose you are using the global nav bar on top. Setting #sideNavBox { DISPLAY: none } would hide the top nav bar as well..