Customize Google's Free SiteSearch Box
-
We have been using Google's Free WebSearch / SiteSearch on our website for quite some time. The site is currently being redesigned and the search box is to be more of a bar ( see: http://finditthere.com ). We can get everything on one line - but the overall form height won't budge less than 50 pixels. Also, we've replaced the google logo and search button with slightly smaller versions than what was provided, but haven't been able to reduce the height of the text field at all.
-
Answer:
Hi, Dot W ~ Sometimes making everything fit can be such a struggle, can't it? Google's Free Web Search gives information on customization here: ://www.google.com/faq_freewebsearch.html#4 Please remember, though, that the height of any table will be determined by the height of its content, and attempts to limit the height may cut off a part of the content in some browsers. Obviously, you need to control the height of the content you want within a table 25 pixels high - and it is necessary to control the size of the content. In your case, it is easy, as there is a minimum amount text (which can be controlled within a form) and the input box, which can also be controlled by setting a text size within the table. See: HTML 4 Newbies, HTML Forms Tutorial - http://www.html4newbies.com/formstutorial.shtml See: Master CGI, HTML forms tutorial - http://mastercgi.com/howtoinfo/formtutorial.shtml See: Net Mechanic, HTML Tip: Controlling Table Size - http://www.netmechanic.com/news/vol5/html_no15.htm So, the tweak or hack to keeping the size of your table to the size of the graphic you submitted (754 pixels wide), which, while not pretty, works cross-browser and keeps the size of the table and the input within the table to your 25 pixel height limit. Notice that I did not limit the table's height to 25 pixels, as doing so actually may make the table a bit taller in some cases. This is based on the variables of your viewer's system setting and default size settings within his browser. The tweaks listed below is one way to achieve what you want. I used relative sizing to keep it readable at individual default settings - and I also reduced the width of the input box to compensate for the amount of text, plus Google's logo within a single row. See: http://209.151.82.182/browsertest.html The tweaks are: 1. The table tag: I changed it to include the width: <TABLE bgcolor=#FFFFFF cellspacing=0 border=1 width="742"> 2. Within the cell, I added font tags like so: <font face="Verdana,Arial,Helvetica,sans-serif" size="-1"><b>SEARCH:</b> 3. I reduced the size for the search tag, although I see you have made a custom search button. The reduction just prior to the search tag is like so: <font size="-2"><INPUT type=submit name=sa VALUE="Search"> 4. I added some hard spaces - - to move the "Powered by:" over. You can also divide the single table cell into two; however I ran into some cross-browser compatibility issues and found working within one cell worked marvelously. Search terms: -- HTML tutorial: controlling table size -- HTML forms: controlling input sizes -- html tutorial form input sizes You can look at the code on the cell above. As I said, it may not be pretty, but sometimes those HTML tweaks aren't lovely to look while they do achieve their purpose. Hope this helps, Serenata
dotw-ga at Google Answers Visit the source
Related Q & A:
- Is the Google's PageRank algorithm a secret?Best solution by Theoretical Computer Science
- How long does it take to have your site in Google's index?Best solution by Yahoo! Answers
- What digital box do I need if i get Comcast Cable for free?Best solution by Yahoo! Answers
- What is google's email address?Best solution by ChaCha
- Where can I customize my car online for free?Best solution by Ask.com old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.