Fix: Search Box Suggestions Layout Problem When Used Outside a Search Center
This post is over a year old, some of this information may be out of date.
Some time ago, I wrote about a layout problem when using the People Search Box Web Part outside a SharePoint Search Center. Other layout problems occurs when you enable Query Suggestions for the Search Box Web Part.

What I experienced is that two different layout problems occur:
- When Search Suggestions are enabled for the Search Box in the Top Navigation Menu;
- When Search Suggestions are enabled for a Search Box on a page.
Fix Search Suggestions When Used in Top Navigation Menu
Problem

Solution
The following CSS code solves the layout problem.
.srch-AutoCompContainer { display: block !important; top: 88px !important; min-width: 218px;}
.srch-AutoCompListItem,.srch-AutoCompHListItem { display: block !important;}
The CSS top attribute value depends on the height of the s4-titlerow.

Fix Search Suggestions When Used on a page
Problem
Search Suggestions are being displayed on top of the Search Box.

Solution
The following CSS code solves the layout problem.
.srch-AutoCompContainer { top: 34px;}
.srch-AutoCompList { min-width: 218px !important;}

Changes
CSS update: 02/11/2011
Changed the width parameter to min-width. This allows the suggestion box to automatically expand based on the suggestion text size.
Related articles
Search Hover Panel Positioning Bug in non IE Browsers (SharePoint 2013)
Fix: People Search Box Has Layout Problems When Used Outside a Search Center
List Of All font-family and font-size Attributes Used in SharePoint 2010 StyleSheets
Report issues or make changes on GitHub
Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.
Comments
Let's build together
Manage content in VS Code
Present from VS Code