Customized SharePoint 2007 Search Center Width Workaround

In SharePoint 2007, you may run into display issues with the form fields for Search Center. I am not referring to the Search inputs usually located in the header area, but the actual Search Center site (
and the search area located near the top of the page under the horizontal

If you apply a custom master page file and don’t mirror the exact formatting
that comes default with SharePoint, you are likely to run into display issues
with your Search link:

As you can see, the word “Search” has been chopped.  This is because there
are hard coded widths in the code that renders as a part of this page.  You
will also notice that there is a chunky padding to the top and left of the
search area.

<div style=”height:100%; width:100%;padding-left:
18px; padding-top: 50px; padding-bottom: 10px;”>


<div style=”WIDTH:


<td valign=”top”>

<div WebPartID=”92a6483d-031f-4d6b-8481-ec03fc9ec614″ HasPers=”false”
id=”WebPartWPQ1″ allowDelete=”false”

<div id=”SRSB”>

<div id=”ctl00_m_g_92a6483d_031f_4d6b_8481_ec03fc9ec614″

Since these are hardcoded, the only option you have for changing it is to create
a new Feature or your own User Control for Search and use that instead of what
is provided by default for SharePoint.

So my workaround for this issue is to add a blank image in the container where
this code is located (usually in the master page). Set the width of the blank image to something long enough
to push out that set width at the DIV level and fully display your Search text.
This does not address the padding issue, and at this point I don’t have a
solution for that. For the chopped text issue, your code would look like:


<td valign=”top” class=”ms-titlearea”><!–
Spacer image here to correct Search Center Fixed width issue –><img src=”/_layouts/images/blank.gif”
width=”700″ height=”1″><br />

<asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb”

SiteMapProvider=”SPContentMapProvider” id=”ContentMap” SkipLinkText=””
NodeStyle-CssClass=”ms-sitemapdirectional” runat=”server”/> &nbsp;




Resulting in:


4 thoughts on “Customized SharePoint 2007 Search Center Width Workaround”

  1. These come from the layout page Searchmain.aspx or Searchresults.aspx. You can find these pages in master page gallery. So you can technically either have a different layout page which doesnt have them hardcoded or fix it in the layout page itself.

  2. have a problem. By mistake, one of the developers, deleted the search center. Is there any way that I can recreate it?

  3. I managed to “uncrop” the text with this CSS in my custom css + table tbody tr td table, + table tbody tr td table div{ width: 100% !important;}

  4. “the only option you have for changing it is to create a new Feature or your own User Control”Not quite. The easier way would be to use a Control Adapter if you have some basic developer skills (nearly none needed).

Comments are closed.