Forum Discussion
Nigel_Price9911
Nov 15, 2017Iron Contributor
IS it Possible to remove the left hand nav from a modern team site
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...
- Jan 28, 2018
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
Aseem Anand
Copper Contributor
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.
Jason Brownhill
Jan 18, 2019Brass Contributor
Sometimes the simplest solutions are always the last to be suggested, thanks for that!