Removing the Quick Launch & Keeping the Global Navigation Bar in SP Online to max Screen Real estate

%3CLINGO-SUB%20id%3D%22lingo-sub-70358%22%20slang%3D%22en-US%22%3ERemoving%20the%20Quick%20Launch%20%26amp%3B%20Keeping%20the%20Global%20Navigation%20Bar%20in%20SP%20Online%20to%20max%20Screen%20Real%20estate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70358%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20SharePoint%20Experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20a%20business%20guy%20that%20is%20trying%20to%20develop%20my%20department's%20SharePoint%20Online%20site.%20I%20understand%20the%20benefits%2C%20and%20know%20the%20basics%20of%20the%20%22Quick%20Launch%20menu%22%20links%20(navigation%20specific%20to%20the%20site)%20and%20top%20%22Navigation%20Menu%20Bar%22%20links%20(global%20navigation%20visible%20across%20all%20site%20pages).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20keep%20my%20Navigation%20Menu%20Bar%20across%20the%20top%20(which%20I%20built%20like%20a%20%22mega%20menu%2C%22%20to%20enable%20users%20to%20jump%20from%20site%20to%20site).%20However%2C%20on%20some%20of%20my%20SPO%20sub%20sites%2C%20I%20want%20the%20ability%20to%20completely%20hide%20the%20left%20side%20Quick%20Launch%20in%20an%20effort%20to%20maximize%20my%20page's%20horizontal%20real%20estate.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20go%20to%20Site%20Settings%20--%26gt%3B%20Navigation%20Elements%20--%26gt%3B%20Uncheck%20the%20box%20for%20%22Enable%20Quick%20Launch%22......then%20it%20removes%20all%20of%20the%20quick%20launch%20links%20on%20the%20sub%20site%20with%20the%20exception%20of%20Site%20Contents.%20And%20given%20that%20site%20contents%20still%20shows%20(despite%20disabling%20quick%20launch)%2C%20my%20overall%20page%20layout%20did%20not%20shift%20to%20the%20left%20to%20cover%20where%20the%20Quick%20Launch%20used%20to%20be.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%2C%20I%20am%20doing%20this%20all%20out-of-the-box.%20I%20am%20not%20a%20code%20writer%20and%20would%20HUGELY%20appreciate%20if%20you%20could%20provide%20a%20recommendation%20for%20me%20to%201)%20completely%20hide%20the%20Quick%20Launch%2C%202)%20have%20my%20site%20layout%20shift%20left%20and%20use%20the%20full%20horizontal%20screen%2C%20and%203)%20allow%20for%20my%20Global%20Navigation%20Launch%20to%20be%20unaffected.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThank%20you%20in%20advance!%3CBR%20%2F%3EDoug%20Doerhoff%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-70358%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EResponsive%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71087%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20the%20Quick%20Launch%20%26amp%3B%20Keeping%20the%20Global%20Navigation%20Bar%20in%20SP%20Online%20to%20max%20Screen%20Rea%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71087%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3E%23sideNavBox%20%7B%20display%3Anone%20!important%20%7D%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23contentBox%20%7B%20margin-left%3A20px%20!important%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIt%20is%20common%20for%20non%20Front-enders%20to%20whack%20in%20%60%60!important%60%60%20because%20they%20are%20fighting%20CSS%20load%20order.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20you%20have%20now%20hijacked%20the%20DOM%20elements%20and%20no%20other%20App%20or%20CSS%20style%20can%20easily%20restore%20them.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EJust%20increase%20Specificity%20so%20it%20doesn't%20matter%20in%20which%20order%20your%20CSS%20is%20applied%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%23sideNavBox%23sideNavBox%20%7B%20display%3Anone%7D%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23contentBox%23contentBox%20%7B%20margin-left%3A20px%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBy%20adding%20even%20more%20Specificity%20any%20other%20code%20can%20still%20override%20you%20changes%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAfter%20Selectors%3A%26nbsp%3B%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcode.tutsplus.com%2Ftutorials%2Fthe-30-css-selectors-you-must-memorize--net-16048%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcode.tutsplus.com%2Ftutorials%2Fthe-30-css-selectors-you-must-memorize--net-16048%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESpecificity%20is%20the%20most%20powerfull%20CSS%20concept%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.smashingmagazine.com%2F2007%2F07%2Fcss-specificity-things-you-should-know%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.smashingmagazine.com%2F2007%2F07%2Fcss-specificity-things-you-should-know%2F%3C%2FA%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70405%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20the%20Quick%20Launch%20%26amp%3B%20Keeping%20the%20Global%20Navigation%20Bar%20in%20SP%20Online%20to%20max%20Screen%20Rea%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70405%22%20slang%3D%22en-US%22%3EIf%20you%20want%20to%20do%20page%20by%20page%2C%20you%20can%20use%20the%20%22Script%20Editor%20Web%20Part%22%20and%20just%20paste%20those%20two%20lines%20in%20between%20a%20%3CSTYLE%3E%3C%2FSTYLE%3E%20tag.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20use%20the%20%22Alternate%20CSS%22%2C%20it%20should%20hypothetically%20apply%20to%20all%20pages.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70382%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20the%20Quick%20Launch%20%26amp%3B%20Keeping%20the%20Global%20Navigation%20Bar%20in%20SP%20Online%20to%20max%20Screen%20Rea%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70382%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20tip%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F637%22%20target%3D%22_blank%22%3E%40Brent%20Ellis%3C%2FA%3E!%26nbsp%3B%20Is%20there%20a%20way%20for%20me%20to%20put%20that%20code%20on%20my%20page%20easily%20with%20tools%20that%20I%20have%20out%20of%20the%20box%3F%26nbsp%3B%20If%20so%2C%20can%20I%20add%20and%20remove%20it%20easily%3B%20if%20I%20want%20the%20quick%20launch%20back%20at%20some%20point%20in%20the%20future%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%2C%3C%2FP%3E%3CP%3EDoug%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70373%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20the%20Quick%20Launch%20%26amp%3B%20Keeping%20the%20Global%20Navigation%20Bar%20in%20SP%20Online%20to%20max%20Screen%20Rea%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70373%22%20slang%3D%22en-US%22%3EIf%20you%20are%20sticking%20with%20the%20classic%20UI%2C%20i'd%20recommend%20doing%20a%20bit%20of%20custom%20code%20(specifically%20CSS%20either%20by%20using%20the%20alternate%20CSS%20set%20on%20the%20%2F_layouts%2F15%2FChangeSiteMasterPage.aspx%20or%20maybe%20injecting%20a%20usercustomaction)%3CBR%20%2F%3E%3CBR%20%2F%3E%23sideNavBox%20%7B%20display%3Anone%20!important%20%7D%3CBR%20%2F%3E%23contentBox%20%7B%20margin-left%3A20px%20!important%3B%20%7D%3CBR%20%2F%3E%3CBR%20%2F%3EThose%20two%20lines%20are%20all%20you%20need%2C%20you%20just%20need%20a%20way%20to%20get%20them%20injected%20into%20the%20entire%20site.%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

Hi SharePoint Experts,

 

I am a business guy that is trying to develop my department's SharePoint Online site. I understand the benefits, and know the basics of the "Quick Launch menu" links (navigation specific to the site) and top "Navigation Menu Bar" links (global navigation visible across all site pages).

 

I want to keep my Navigation Menu Bar across the top (which I built like a "mega menu," to enable users to jump from site to site). However, on some of my SPO sub sites, I want the ability to completely hide the left side Quick Launch in an effort to maximize my page's horizontal real estate.

 

If I go to Site Settings --> Navigation Elements --> Uncheck the box for "Enable Quick Launch"......then it removes all of the quick launch links on the sub site with the exception of Site Contents. And given that site contents still shows (despite disabling quick launch), my overall page layout did not shift to the left to cover where the Quick Launch used to be.

 

Note, I am doing this all out-of-the-box. I am not a code writer and would HUGELY appreciate if you could provide a recommendation for me to 1) completely hide the Quick Launch, 2) have my site layout shift left and use the full horizontal screen, and 3) allow for my Global Navigation Launch to be unaffected.


Thank you in advance!
Doug Doerhoff

4 Replies
Highlighted
If you are sticking with the classic UI, i'd recommend doing a bit of custom code (specifically CSS either by using the alternate CSS set on the /_layouts/15/ChangeSiteMasterPage.aspx or maybe injecting a usercustomaction)

#sideNavBox { display:none !important }
#contentBox { margin-left:20px !important; }

Those two lines are all you need, you just need a way to get them injected into the entire site.
Highlighted

Thanks for the tip @Brent Ellis!  Is there a way for me to put that code on my page easily with tools that I have out of the box?  If so, can I add and remove it easily; if I want the quick launch back at some point in the future?

 

Thanks again,

Doug

Highlighted
If you want to do page by page, you can use the "Script Editor Web Part" and just paste those two lines in between a <style></style> tag.

If you use the "Alternate CSS", it should hypothetically apply to all pages.
Highlighted

#sideNavBox { display:none !important }
#contentBox { margin-left:20px !important; }

 

It is common for non Front-enders to whack in ``!important`` because they are fighting CSS load order.

But you have now hijacked the DOM elements and no other App or CSS style can easily restore them.

 

Just increase Specificity so it doesn't matter in which order your CSS is applied 

 

#sideNavBox#sideNavBox { display:none}
#contentBox#contentBox { margin-left:20px}

 

By adding even more Specificity any other code can still override you changes

 

After Selectors: 
https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048

 

Specificity is the most powerfull CSS concept:
https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/