SOLVED
Home

IS it Possible to remove the left hand nav from a modern team site

%3CLINGO-SUB%20id%3D%22lingo-sub-320861%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320861%22%20slang%3D%22en-US%22%3E%3CP%3ESometimes%20the%20simplest%20solutions%20are%20always%20the%20last%20to%20be%20suggested%2C%20thanks%20for%20that!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290687%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290687%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20are%20you%20doing%20this%20from%20a%20web%20part%20on%20a%20modern%20page%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274773%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274773%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20It%20can%20be%20done.%20Go%20to%20Site%20Settings%20-%26gt%3B%20Navigation%26nbsp%3BElements%20(under%20Look%20and%20Feel).%3C%2FP%3E%3CP%3EUncheck%20%22Enable%20Quick%20launch%22.%20This%20should%20remove%20the%20left%20navigation%20pane.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-228103%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-228103%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F10188%22%20target%3D%22_blank%22%3E%40Chad%20Renstrom%3C%2FA%3Ewhat%20kind%20of%20site%20are%20you%20doing%20that%20on%3F%20when%20i%20try%20it%20on%20a%20modern%20group%20enabled%20team%20site%2C%20it%20does%20not%20work%20on%20the%20home%20page.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-215500%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-215500%22%20slang%3D%22en-US%22%3E%3CP%3EI%20found%20the%20answer%20without%20using%20any%20stylesheets.%26nbsp%3B%20Under%20Site%20Settings%20-%26gt%3B%20change%20the%20look%2C%20then%20select%26nbsp%3Bthe%20current%20look%2C%20ten%20on%20the%20next%20page%20change%20the%20Site%20Layout%20to%20Oslo.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F37647i7AEEC2E2E28922D8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22sitelayout.jpg%22%20title%3D%22sitelayout.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-178581%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-178581%22%20slang%3D%22en-US%22%3E%3CP%3EHey%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Emine%20is%20actually%20running%20from%20a%20web%20part%20on%20the%20page%20(not%20a%20customizer)%20and%20yes%20it%20definitely%20shows%20the%20LHS%20nav%20for%20a%20flicker%20before%20the%20CSS%20is%20processed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20may%20be%20a%20better%20way%20to%20get%20the%20CSS%20processed%20earlier%20in%20the%20page%20load%2C%20but%20I%20am%20not%20sure%20how%2Fwhat%20is%20the%20best%20way%20to%20achieve%20that%20-%20sorry.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20do%20find%20out%2C%20please%20post%20the%20solution%20on%20this%20thread%20as%20it%20would%20be%20good%20to%20know%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-178406%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-178406%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Nigel%2C%20that's%20what%20I%20am%20trying%20to%20do%20from%20the%20extension.%3C%2FP%3E%0A%3CP%3EDid%20you%20notice%20a%20that%20left%20nav%20is%20still%20rendered%20for%20a%20split%20second%20before%20our%20application%20customizer%20actually%20loads%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149657%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149657%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Nigel%20-%20it%20certainly%20does.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149634%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149634%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20the%20supported%20way%20to%20do%20this%20would%20be%20to%20write%20an%20extension%20(so%20it%20is%20applied%20to%20all%20pages%20in%20the%20site)%20that%20implements%20CSS%20to%20make%20the%20changes%26nbsp%3Byou%20are%20after.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20CSS%20to%20hide%20the%20left%20hand%20nav%20on%20a%20modern%20page%20is%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CPRE%3Enav%5Brole%3D'navigation'%5D%20%7B%0A%20%20%20%20display%3A%20none%20!important%3B%0A%7D%0Adiv%5Bclass%5E%3D'searchBox_'%5D%20%7B%0A%20%20%20%20display%3A%20none%20!important%3B%0A%7D%0Adiv%5Bclass%5E%3D'pageContainer_'%5D%20%7B%0A%20%20%20%20left%3A%200%20!important%3B%0A%7D%20%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20same%20extension%20that%20injects%20this%20CSS%20could%20also%20display%20a%20search%20box%20(if%20you%20want%20it%20on%20every%20page)%2C%20that%20redirects%20users%20to%20your%20search%20results%20page%20and%20injects%20the%20query%20into%20the%20'k'%20querystring%20parameter%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ehope%20it%20helps%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146763%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146763%22%20slang%3D%22en-US%22%3EBump%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-696454%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-696454%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20modern%20pages%20you%20can%20do%20this%20without%26nbsp%3Bcss%20-%20just%20in%20site%20settings%2C%20Navigation%20Elements%20-%26gt%3B%20uncheck%20Quick%20launch%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-782204%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782204%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52987%22%20target%3D%22_blank%22%3E%40Angus%20Muir%3C%2FA%3E%26nbsp%3BI%20unchecked%20the%20'Quick%20Launch'%20box%20but%20now%20it%20leaves%20a%20blank%20space%20where%20the%20quick%20launch%20used%20to%20be.%20Anyone%20else%20have%20this%20issue%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20349px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125123i1699C27F1717FCA5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-813869%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-813869%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52987%22%20target%3D%22_blank%22%3E%40Angus%20Muir%3C%2FA%3E%26nbsp%3B%20That%20doesn't%20seem%20to%20work%2C%20at%20least%20now%20in%20my%20modern%20site.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-885910%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-885910%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4102%22%20target%3D%22_blank%22%3E%40Nigel%20Price%3C%2FA%3E%26nbsp%3BI%20found%20that%20you%20can%20hide%20the%20div%20in%20a%20CSS%20stylesheet.%20Just%20replace%20the%20red%20text%20below%20with%20the%20id%20for%20your%20div%20and%20it%20should%20hide%20it.%20I've%20noticed%20that%20the%20div%20changes%20after%20a%20while%20which%20means%20I%20need%20to%20go%20update%20the%20id%20for%20that%20div%20but%20it%20works%20well%20otherwise.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSTRONG%3Ediv.%3CFONT%20color%3D%22%23FF6600%22%3E%3CU%3EspNav_1846ed68%20%3C%2FU%3E%3C%2FFONT%3E%7Bposition%3A%20absolute%3B%20visibility%3A%20hidden%3B%20display%3A%20none%20!important%3B%7D%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-954987%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-954987%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F366555%22%20target%3D%22_blank%22%3E%40dancourcelles%3C%2FA%3E%26nbsp%3BI%20was%20building%20personal%20pages%20for%20employees%20that%20don't%20require%20LHS%20navigation%20and%20was%20able%20to%20remove%20it%20from%20%22Site%20Settings%22%20--%26gt%3B%22Navigation%22%20--%26gt%3B%20%22Structural%20Navigation%3A%20Editing%20and%20Sorting%22.%26nbsp%3B%20Select%20%22Current%20Navigation%22%20and%20delete%20all%20items%20in%20the%20list.%26nbsp%3B%20Click%20OK.%26nbsp%3B%20As%20a%20note%2C%20this%20removed%20the%20navigation%2C%20but%20you%20can't%20use%20the%20column%20space%20that%20was%20vacated%20by%20the%20navigation.%26nbsp%3B%20So%20even%20with%20a%204%20column%20layout%20(3%20columns%20plus%20the%20vertical%20column)%2C%20the%20columns%20just%20float%20left%20and%20the%20(now%20empty%20and%20unusable)%20fifth%20column%20floats%20to%20the%20right%20hand%20side%20of%20the%20page.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-128232%22%20slang%3D%22en-US%22%3EIS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-128232%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20remove%20the%20left%20hand%20navigation%20bar%20from%20a%20modern%20team%20site%20so%20that%20If%20I%20use%20a%20Hero%20Web%20Part%20it%20can%20take%20up%20the%20whole%20of%20the%20screen%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20can%20I%20put%20the%20old%20search%20box%20in%20the%20top%20right%20hand%20corner%20of%20the%20screen%20and%20point%20it%20to%20a%20classical%20Search%20Results%20page%20where%20I%20have%20refiners%20etc%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-128232%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExtensibility%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-989780%22%20slang%3D%22en-US%22%3ERe%3A%20IS%20it%20Possible%20to%20remove%20the%20left%20hand%20nav%20from%20a%20modern%20team%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-989780%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F433697%22%20target%3D%22_blank%22%3E%40PCH_Mark%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20remove%20left%20hand%20navigation%20my%20search%20box%20disappears.%20When%20I%20refresh%20screen%20it%20flickers%20for%26nbsp%3Bless%20then%20a%26nbsp%3Bsecond%20and%20boom--gone.%3C%2FP%3E%3CP%3EHow%20do%20I%20get%20it%20back%2C%20I%20need%20search%20box.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Nigel Price
Regular Contributor

Hi

 

Is it possible to remove the left hand navigation bar from a modern team site so that If I use a Hero Web Part it can take up the whole of the screen ?

 

Then can I put the old search box in the top right hand corner of the screen and point it to a classical Search Results page where I have refiners etc ?

 

Thanks

 

Nigel

15 Replies
Solution

I think the supported way to do this would be to write an extension (so it is applied to all pages in the site) that implements CSS to make the changes you are after.

 

The CSS to hide the left hand nav on a modern page is:

 
nav[role='navigation'] {
    display: none !important;
}
div[class^='searchBox_'] {
    display: none !important;
}
div[class^='pageContainer_'] {
    left: 0 !important;
} 

 

The same extension that injects this CSS could also display a search box (if you want it on every page), that redirects users to your search results page and injects the query into the 'k' querystring parameter

 

hope it helps,

 

Nigel

 

Thanks Nigel - it certainly does.

Thanks Nigel, that's what I am trying to do from the extension.

Did you notice a that left nav is still rendered for a split second before our application customizer actually loads?

Hey,

 

mine is actually running from a web part on the page (not a customizer) and yes it definitely shows the LHS nav for a flicker before the CSS is processed.

 

There may be a better way to get the CSS processed earlier in the page load, but I am not sure how/what is the best way to achieve that - sorry.

 

If you do find out, please post the solution on this thread as it would be good to know

 

Thanks

 

Nigel

I found the answer without using any stylesheets.  Under Site Settings -> change the look, then select the current look, ten on the next page change the Site Layout to Oslo.

 

sitelayout.jpg

@Chad Renstromwhat kind of site are you doing that on? when i try it on a modern group enabled team site, it does not work on the home page.

Highlighted

Yes, It can be done. Go to Site Settings -> Navigation Elements (under Look and Feel).

Uncheck "Enable Quick launch". This should remove the left navigation pane.

How are you doing this from a web part on a modern page?  

Sometimes the simplest solutions are always the last to be suggested, thanks for that!

In modern pages you can do this without css - just in site settings, Navigation Elements -> uncheck Quick launch

@Angus Muir  That doesn't seem to work, at least now in my modern site.

@Nigel Price I found that you can hide the div in a CSS stylesheet. Just replace the red text below with the id for your div and it should hide it. I've noticed that the div changes after a while which means I need to go update the id for that div but it works well otherwise.

 

div.spNav_1846ed68 {position: absolute; visibility: hidden; display: none !important;}
 
 

@dancourcelles I was building personal pages for employees that don't require LHS navigation and was able to remove it from "Site Settings" -->"Navigation" --> "Structural Navigation: Editing and Sorting".  Select "Current Navigation" and delete all items in the list.  Click OK.  As a note, this removed the navigation, but you can't use the column space that was vacated by the navigation.  So even with a 4 column layout (3 columns plus the vertical column), the columns just float left and the (now empty and unusable) fifth column floats to the right hand side of the page.

@PCH_Mark 

When I remove left hand navigation my search box disappears. When I refresh screen it flickers for less then a second and boom--gone.

How do I get it back, I need search box.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies