Confluence Federated Search Results Appear in a Narrow Column in SharePoint 2010

Symptoms

When you configure a Federated Search Results Web Part to display search results from Confluence (see our guide to Configuring the SharePoint Federated Search on SP 2010), the search results appear in a narrow vertical column, even though the web part is added to a Web Part Zone that is wide.  The search results may look something like this:

Cause

The default theme for SharePoint 2010 imposes a hard-coded width of approximately 200 pixels on search results in Federated Search Results web parts.  This limitation is not restricted to the Confluence web part, or to search results from Confluence; you can reproduce the same problem using an out-of-the-box Federated Results web part and using the default 'Internet Results' federated location.

Resolution

You can workaround this problem by injecting custom CSS into the search results page that overrides the default theme using the Content Editor Web Part.  Note that if you have multiple search sites, you will need to perform this workaround for each individual results page. A better solution for large sites would be to deploy your own feature that overrides the default theming.

Overriding the Default Search Results Style Using the Content Editor Web Part

  1. Go to the search results page (eg. http://sharepoint-server/search/results.aspx) and edit the page. 
  2. Add a new 'Content Editor' web part to the page:

  3. Select the web part in the editor and then select the 'Editing Tools' -> 'Format Text' ribbon.
  4. From the 'Markup' group, select 'HTML' -> 'Edit HTML Source':

  5. Copy and paste the following text into the 'HTML Source' dialog:

    <style>
    .ms-searchsummarymain
    {
      width: auto !important;
    }
    div.ms-searchsummarydesc
    {
      width: auto !important;
    }
    </style>
    
  6. Click 'OK' to close the 'HTML Source' dialog.
  7. Edit the properties of the Content Editor web part and in the 'Layout' section, ensure that the 'Hidden' option is selected.
  8. Click 'OK' to save the changes to the web part properties.
  9. Save your changes to the search results page and exit edit mode.

The search results should now display across the entire width of the selected web part zone:

There is no content with the specified labels