Notes about the Custom Search Engine iframe interface
- To set up the iframe, go to the CSE Control Panel / Look and Feel page and choose iframe. You can also set some border, background and text colors. Then be sure to Save, and click on Get Code
- Paste the results page URL in the top field of the Get Code page. This page should have your site look and navigation elements.
- In the Get Code page, the Search box field will update with the results URL: copy and paste this into an HTML page.
- From the Get Code page, copy the Search results code. Open your results page (the URL you gave above) and paste the code into the middle of that page. The search results will be inserted there.
iframe results list width and advertising location
- Note that the free CSE must display the ads returned with the search results.
- Ads on the right: set the cof parameter to FORID:9 and the result will be 795 pixels wide:
- Ads on the top and bottom: set the cof parameter to FORID:11 and the result will be 500 pixels wide
- Set the googleSearchFrameWidth wider if desired.
- The iframe height should auto-adjust based on content (but sometimes leaves a lot of blank space at the bottom).