Pages

Monday, September 2, 2013

SharePoint 2013 - How to hide the default searchbox

One of our customers wanted to hide the default search box at the top right side of the screen but only for the home page! Instead of creating a separate Master Page a colleague of mine (Maarten van den Dungen) recommended adding a Content Editor Web Part with the following code:

<style type="text/css">
#titleAreaBox #SearchBox {display: none !important;}
</style>

Before:



After:
Hope you find this useful for your SharePoint projects.

2 replies:

Marijn said...

Jasper,
It hides the box, but if your navigation is wider (when you have a horizontal scroll bar), it still displays a white box with unused space.
You probably need to hide something more, but I couldn't figure out just what.
Will post back when I figure it out.

Unknown said...

Thanks for your feedback! Please let me know so I can update this article :)

Post a Comment