Killer Firefox Tip #329: Extending the Search Bar

Sep 12, 04:55 pm

I generally spend several hours a day doing Web-based research, using Firefox of course. Accordingly, the key combinations Ctrl+T, Ctrl+K have long become king since I can easily open a new tab and execute a new Google search at will, without having to return to the Google homepage.

Yet one of the annoyances of the search bar is it’s exceedingly short width. After just a few characters the search string starts to scroll, and more often than not I begin to question whether I’ve indeed spelled the string correctly.

To change the width of this text field you can create a userChrome.css file, which allows you to override Firefox’s default interface settings. This file should appear in the following locations:

Windows 2000 and XP:
C:\Documents and Settings\[USER]\Application Data\Mozilla\Firefox\Profiles\randomString.default\chrome\

Linux/Unix:
~/.mozilla/firefox/[Profile name]/chrome/

In your favorite text editor create this file, saving it to the appropriate aforementioned location. Then add the following lines to the file, save it, and restart Firefox:

/* Extend the Search box width

#search-container, #searchbar { -moz-box-flex: 300 !important; }

That’s it! Now you’ll be able to view a significantly larger search string with ease.

Jason



    1. What would be useful is to be able to have two search boxes. One could be set to search one engine, the other to search a different one. I search Amazon pretty much all day long and usually have to go straight to Amazon home page to search.

      Incidentally, the beta of Firefox 2.0 has Google search autocomplete – type a search term and it will be autocompleted with common search terms, just like Google Suggest: http://www.google.com/webhp?complete=1&hl=en




Add your comments

Please keep your comments relevant to this blog entry: inappropriate or purely promotional comments may be removed. To add hyperlink, please follow this example: "your link text":http://your.link.url