AdSense: Remove White Space in Search Results

Saturday, September 29, 2007

Search Engine Marketing - Build Static PagesWhen you add a Search Box on your website using 'Google AdSense for Search' with the option: "", the search results are opened in an iFrame of a very large height. This would cause a large block of white space to appear after the search results. You can remove this extra block of white space by adding the following variable value to your AdSense code on your search results page:

var googleSearchResizeIframe = true;
This would adjust the height of the iFrame according to your search results.

And if you need to specify a minimum height for your search results, include your search code in div tags and use the Cross-Browser solution for CSS min-height.

2 comments:

Mark M - Clutterme Founder said...
This comment has been removed by the author.
Gurpreet Singh Modi said...

I had tested this only on IE and Firefox. Don't have any solutions for Safari.

Post a Comment