Hiding the Search Box When Printing
Ever noticed that the search box is shown on a SharePoint page when printed while other parts of the page are hidden?
The Search box can be hidden, along with other parts of a form you don’t want printed by using styles. This can be done using Microsoft Office SharePoint Designer:
- Open the master page in SharePoint Designer
- Add the following style either to a CSS file included in the master page or as a style within the master page itself:
- Locate the delegate control used to display the search box and add the code shown in italics:
<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”>
<SharePoint:DelegateControl runat=”server” ControlId=”SmallSearchInputBox”/>
This defines a span that uses the style HideForPriting, the content of which will be hidden when the page is printed.