none
SharePoint 2010 - Search Box Appears Larger on Search Results Page

    Question

  • The search box appears larger on the search results page than it does on any page from the parent site or other sub-sites. It was originally hidden but I removed the PlaceHolderSearchArea code from the page layout and now it is displaying but is a lot larger than it should be.

    The search results page is using the same custom master page as the parent.

    On search results page: Larger Search Box

    On all other pages in parent / other sub sites: Normal Search Box

    Using the developer tools in IE9 I have found out that the table housing the scope drop down and search box is part of class ms-sbtable ms-sbtable-ex on the search results page but ms-sbtable ms-sbtable-ex s4-search everywhere else, when I add the extra class in to IE9 it seems to rectify the issue.

    I'm not sure where in SharePoint to add the additional class, please help.

    Monday, July 29, 2013 3:09 PM

Answers

  • Using a single custom master page in 2010 can be a pain.

    In your case i'd add a CEWP at the bottom of the page and use JQuery to add the appropriate class to the search box. It is the safest approach and the least effort as well.

    • Marked as answer by KayMorris Tuesday, July 30, 2013 2:06 PM
    Tuesday, July 30, 2013 6:46 AM

All replies

  • Using a single custom master page in 2010 can be a pain.

    In your case i'd add a CEWP at the bottom of the page and use JQuery to add the appropriate class to the search box. It is the safest approach and the least effort as well.

    • Marked as answer by KayMorris Tuesday, July 30, 2013 2:06 PM
    Tuesday, July 30, 2013 6:46 AM
  • Thank you for your reply Alex.

    I added a CEWP to the page and added the following code and is now picking up the CSS classes:

    <script type="text/javascript">

        $("#Search").addClass("s4-search srch-gosearchimg ms-sbplain searchtable searchtr searchtd");</script>

    It still doesn't quite look the same as on the parent / other sub sites but a few amendments to the CSS should resolve that.

    Tuesday, July 30, 2013 2:12 PM