I'm trying to remove the left navigation completely in a custom SharePoint 2013 master page and have created a CSSregistration link to a custom CSS style sheet with the following CSS. While the CSS for the titlerow is applied, the other is not.

<style type="text/css">
.ms-core-sideNavBox-removeLeftMargin {
display: none !important;
#contentBox {
margin-left:20px !important;
display: none !important;

Doing it with CSS won't get rid of the quick launch so in my .html file i just removed everything between the div tag holding the sideNavBox. This fixed my problem and removed the quick launch but i'm unsure if this is really the correct or necessary way to do it? I thought that i could get rid of any element by using a custom CSS file.

This is the div tag i removed everything from. Uploaded and published the html file and the quick launch gone. Am i doing it wrong?

<div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList">


1 Answer 1


If you are not using Quick Launch then it is better to remove from the Master Page instead of hiding.

There is no problem doing that.

  • Thanks for the answer. Should i remove the div tag completely or keep it with any content as in my question? Apr 23, 2015 at 14:30
  • 2
    You can remove it or simply add style="display:none;".. Removing will not render anything. While adding style will render and hide. Apr 23, 2015 at 14:38
  • @AmalHashim You should clearify "removing" - if you remove a PlaceHolder (i.e. PlaceHolderLeftNavBar) it will cause all page layouts to fail if they have content for the placeholder. Btw. CSS applied to the head will be processed before rendering. So applying a display:none in CSS will prevent the item from being rendered.
    – Mx.
    Apr 23, 2015 at 15:44
  • I tried this in 2013 Html Master Page and it worked. Apr 23, 2015 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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