Bookmarklets Snipping Tool for Vista Clean Your Keyboard and Mouse Panoramic Image XP Look Like Vista
Collapsed This Week Collapsed CyberNotes
Collapsed Last Week

CyberNotes: Auto-hide any Firefox Toolbar

November 12th, 2008
14 Comments Written by Ryan

CyberNotes
Web Browser Wednesday


Having toolbars in a browser can be both frustrating and convenient. On one hand they can often cram a lot of useful functionality into a small area, but on the other hand they eat up precious space that could be used for viewing websites. After all, we know what your browser can look like when you’ve installed a few too many toolbars.

I’ve managed to find a happy medium by automatically hiding the toolbars so that they only appear when my mouse hovers over any other toolbar (ex. the navigation/address bar), and that’s what we’re going to show you today. First we’ll go ahead and demonstrate how to do this with just the bookmarks toolbar, and then we’ll walk you through the steps needed to apply this to just about any Firefox toolbar such as the Google Toolbar.


–Auto-hide a Toolbar–

  1. Make sure you have the Stylish extension installed in Firefox.
  2. In the bottom-right corner of the Firefox window you should see the Stylish icon sitting in the Status Bar. Click on the icon, and go to Write Style > Blank Style.
    stylish blank style.jpg
  3. Provide a description for the toolbar that you’re about to auto-hide, such as “Auto-hide the bookmarks toolbar”. In the code box copy and paste the following:

    #PersonalToolbar{display:none;}
    #navigator-toolbox:hover > #PersonalToolbar{display:-moz-box;}

    The “PersonalToolbar” ID refers to the bookmarks toolbar, and when all is said and done your Stylish window should look something like this:
    firefox autohide toolbar.jpg

  4. As soon as you hit Save the changes should take effect immediately. The bookmarks toolbar will be out-of-sight, but it will reappear when you hover over another toolbar (like the address/navigation bar).

–Find the ID of a Toolbar–

Now what about the toolbars who’s ID you don’t know? That’s a little trickier, but it won’t take you long to catch on. The toolbar we’re going to use in this half of the demonstration is the Google Toolbar, and we’ll show you step-by-step how you can find its ID so that you can auto-hide it.

  1. If you’re using Firefox 3 you’ll need to go and download the DOM Inspector since it’s no longer included with the browser. It is bundled with versions of Firefox prior to version 3.
  2. Once it’s downloaded and installed you need to start it by going to Tools > DOM Inspector. This tool will give us the ability to get the ID of any element in the browser, including toolbars.
  3. Go to File > Inspect Chrome Document, and choose the first item in the list (it may say something different than what my screenshot does).
    chrome inspect.jpg
  4. Now in the DOM Inspector click on the icon in the toolbar that has a mouse cursor pointing to a rounded box. Then switch over to the Firefox window and click on an item on the toolbar you want to auto-hide. You should see a red box appear around it as you’re clicking.
    firefox dom inspector-1.jpg
  5. Now if you switch back to the DOM Inspector it will have highlighted the item that you clicked on. We’re looking for the ID of the toolbar itself, and not the item that you clicked on which was likely a button on the toolbar. If you look a little above the item that you clicked on you should see the ID of the toolbar:
    firefox dom inspector id.jpg
  6. Now we just need to plug that ID into the Stylish script that we provided above. So auto-hiding the Google Toolbar would look something like this:

    #gtbToolbar{display:none;}
    #navigator-toolbox:hover > #gtbToolbar{display:-moz-box;}

That’s all there is to it. It may take a little while for you to get the hang of using the DOM Inspector, but it will be worth it.

–Overview–

Now the power is in your hands to auto-hide as many toolbars as you want. This trick will also work for hiding multiple toolbars simultaneously, and they will all appear at the same time when you hover over the navigation bar.

Also, feel free to leave the ID’s of any toolbars you find in the comments below so that you might save other people a little bit of trouble.

RSS Icon This is just one of the hundreds of CyberNotes we have done. You can find more of them by visiting our CyberNotes category, or by subscribing to our CyberNotes feed. We also have a full feed available if you want to receive all of our articles in your reader!

Tags: CyberNotes, Firefox, Software, , , , ,

Learn Firefox
Previous ArticleNext Article
 

Related Posts:


14 Unread Comment Tracking CyberMark This Article
RSS Icon
14

  1. Avatar

    The stumbleupon (Which got me here) toolbar ID is simply “stumbleupon”.
    So the script would be like so:
    #stumbleupon{display:none;}
    #navigator-toolbox:hover > #stumbleupon{display:-moz-box;}

  2. Avatar

    Awesome tip! :mrgreen:

  3. Avatar

    You’re a good man Charlie Brown!!

    Thanks Ryan, i was looking for something like this!
    It’s a bit “complicated” but we’ll follow your instructions.

    You’re inspired!

    :P

  4. Avatar

    Thanks for the great tip. This is especially useful for netbook with small screen, such as the Eee PC. :)

    ID for Diigo = diigotb-toolbar

    #diigotb-toolbar{display:none;}
    #navigator-toolbox:hover > #diigotb-toolbar{display:-moz-box;}

  5. netster007x (All-Star) Quote this Comment Report this Comment
    Avatar

    Why I use Google Chrome:

    [cybernetnews.com]

  6. Avatar

    Great tips!

    Only catch: it is difficult (almost impossible) to navigate through a folder in the bookmark toolbar as as soon as the mouse is hovered down to the items in the folder, the toolbar then also disappears. Any idea how to change the script to fix this?

    Otherwise, looks great!

  7. Avatar
    soulslayer wrote:
    Only catch: it is difficult (almost impossible) to navigate through a folder in the bookmark toolbar as as soon as the mouse is hovered down to the items in the folder, the toolbar then also disappears. Any idea how to change the script to fix this?

    I don’t think there is an easy fix for that issue. I’ll see if I can figure something out though.

  8. Avatar
    Ryan wrote:
    soulslayer wrote:
    Only catch: it is difficult (almost impossible) to navigate through a folder in the bookmark toolbar as as soon as the mouse is hovered down to the items in the folder, the toolbar then also disappears. Any idea how to change the script to fix this?

    I don’t think there is an easy fix for that issue. I’ll see if I can figure something out though.

    You can fix this editing the UserChrome.css file inside the chrome directory in your profile folder.
    For example, for the bookmark toolbar type the next CSS code:
    #navigator-toolbox:hover > #PersonalToolbar
    {
    visibility: visible !important;
    }
    #PersonalToolbar
    {
    visibility: collapse !important;

    Greetings

  9. Avatar
    **Juanito** wrote:
    You can fix this editing the UserChrome.css file inside the chrome directory in your profile folder.

    I was going to provide instructions to people for using the UserChrome.css file, but it’s more complicated to explain than using the Stylish extension.

  10. Avatar
    **Juanito** wrote:
    You can fix this editing the UserChrome.css file inside the chrome directory in your profile folder.
    For example, for the bookmark toolbar type the next CSS code:
    #navigator-toolbox:hover > #PersonalToolbar
    {
    visibility: visible !important;
    }
    #PersonalToolbar
    {
    visibility: collapse !important;

    Greetings

    Works great! Thanks!

  11. Avatar
    Ryan wrote:
    **Juanito** wrote:
    You can fix this editing the UserChrome.css file inside the chrome directory in your profile folder.

    I was going to provide instructions to people for using the UserChrome.css file, but it’s more complicated to explain than using the Stylish extension.

    Yes, you’re right but unfortunately is the only way to do this, for now…

    soulslayer wrote:
    Works great! Thanks!

    U welcome.

    The CSS codes to tweak the chrome aren’t equal in Firefox 3 and Firefox 2

  12. Avatar

    It’s an excellent tip!

    But I have the same problem as Soulslayer had. I tried Juanito’s method, but it had no effect. I suppose I must’ve done something wrong.
    Could anybody give me more details how I should edit css file properly.

  13. Avatar

    Thanks yaar, great tips,
    Keep going

  14. Avatar

    i like this tip, it’s very useful. i prefer as much screen space for viewing the web page as possible so i’ve actually hidden both the menu-bar and the nav bar but i have not hidden the bookmarks bar because i use the bookmarks bar a lot more than the other two. the problem with this is, every time i go to click something on the bookmarks bar it moves two steps lower because the nav bar and menu bar appear. is it possible to change the hotspot size for the mouse before the other bars appear? as in, would it be possible to set it to view the hidden bars only when the mouse gets much closer to the top of the bookmarks bar? if that makes any sense to anyone, i’m unable to explain it better, but would appreciate any help (if possible).

:mrgreen: :| :twisted: 8O :) :? 8) :evil: :D :oops: :P :roll: ;) :cry: :o :lol: :x :(
↓ Expand Text Area  or  Decrease Text Area ↑

 Find out how to track new comments!