By kamesh on
Hi
Does anyone know how to re size the seach box? i looked at the page source and the current width is set to 15 characters, i need to make this smaller?
any ideas
thanks
Hi
Does anyone know how to re size the seach box? i looked at the page source and the current width is set to 15 characters, i need to make this smaller?
any ideas
thanks
Comments
and
sorry, but what if you replace 15 with 14?
CSS comes to the rescue
I'm assuming here that you are running Drupal 4.7.3 and a default theme. If you look at your HTML source you'll see that the search box is part of a form with the id search_form and that your search box itself has the id edit-keys. This gives you two handles to talk to the search box in your CSS. So in your theme's style.css you can say something like:
Basically, this bit of CSS says: look for any element having the id "edit-keys" which is embedded in an element having the id "search_form". And the only thing matching this declaration happens to be your search box. Therefore the width of your search box is set to 40px.
Generally, it's good practice to let your CSS handle things that have to do with presentation, and to leave the content and structure to the HTML.