Autohide Bookmarks Toolbar - show ONLY IF hovering over menubar

edited September 2007 in userstyles.org
There is an existing stylish which will autohide Bookmarks Toolbar.
However it shows if I hover over any toolbar on the top of the screen.
It makes the Bookmarks Toolbar keep hiding and showing. That is annoying.

So I want it to show ONLY IF we hover over the menubar

How can I achieve it?

Here's the template:
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/* Hide Bookmarks Toolbar by default */
#PersonalToolbar {
display: none;
}

/* Show if hovering over Menubar only */
{insert missing CSS here}


/* Show if Bookmarks Toolbar is active */
#PersonalToolbar:active {
display: -moz-box;
}

Comments

  • edited September 2007
    You can't. Because when you move the cursor into Bookmarks Toolbar, the menubar loses its hover status and the Bookmarks Toolbar will hide again.

    Also, menubar it's not parent element of Bookmarks Toolbar so you can't use parent:hover > child { display: -moz-box; } trick.
  • You could use a custombutton to toggle the bookmarks toolbar. It would stop the annoyance but still allow quick access to your bookmarks toolbar.
  • edited September 2007
    Posted By: LouCypherYou can't. Because when you move the cursor into Bookmarks Toolbar, the menubar loses its hover status and the Bookmarks Toolbar will hide again.

    Also, menubar it's not parent element of Bookmarks Toolbar so you can't useparent:hover > child { display: -moz-box; }trick.
    I put the menubar just above Bookmarks Toolbar.
    Once I move the cursor to Bookmarks Toolbar, this CSS code will be activated.
    /* Show if Bookmarks Toolbar is active */
    #PersonalToolbar:active {
    display: -moz-box;
    }
    But as you said, parent:hover > child { display: -moz-box; } trick won't work, so we need to think of another trick.
  • Posted By: jw25You could use a custombutton to toggle the bookmarks toolbar. It would stop the annoyance but still allow quick access to your bookmarks toolbar.
    That would be a good solution but I don't know how to make such a button?

    I want to make toggle buttons for all toolbars too - meunbar, navigation bar, bookmarks toolmarks.
    Also custom toolbars: Google toolbar (the addon from official Google), Foxlingo toolbar.
  • Wai Wai,
    You'll need the Custom Buttons² extension and then one of these buttons:
    Toggle Bookmarks Toolbar
    Toolbar Manipulator
  • Posted By: Wai WaiI put the menubar just above Bookmarks Toolbar.
    If that case you can use the + selector, but only if the menubar is really above the Bookmarks Toolbar in the DOM
    #toolbar-menubar:hover + #PersonalToolbar,
    #PersonalToolbar:hover {
    display: -moz-box;
    }
  • LouCypher, thank you very much.
    It works like charm.
Sign In or Register to comment.