Centralize the bookmarks toolbar with userChrome.css
How can I centralize the bookmarks toolbar with userChrome.css? Thanks
All Replies (9)
Third time is the charm, you'll get an answer so as to bump this thread back to the top of the queue.
Do you know CSS code for centering a line? I don't. Whenever I want CSS code for Firefox I peruse UserStyles.org and look for a Style that has that code and then copy the code into my userChrome.css file. I ain't a programmer, I am just a Firefox user and volunteer my time here. I just hack Firefox the best that I can using the "tools" at my disposal, which I find in various places.
You can probably use the Classic Theme Restorer and add flexible space at the left and right of the "bookmarks Toolbar items" to center the bookmarks.
I won't use an addon for that purpose alone.
What I have is this:
#PersonalToolbar{ -moz-appearance:none !important; text-align: center !important; } #personal-bookmarks { text-align: center !important; /* for centralised bookmarks */ display: block !important; /* for centralised bookmarks */ }
But it doesn't work properly. Sometimes the bar goes back to the left. I don't know why.
"display: block" will slightly change the bookmark height when I click it. I don't think it suppose to happen.
Modified
You can uninstall the CTR extension after you have placed the flexible space on the Bookmarks Toolbar. You only need the CTR extension to be able to move them to the toolbar.
Flexible space and separators are still supported in current Firefox releases. They are merely not present in the Customize palette, you would have to install or enable an extension like CTR temporarily to have them present in the Customize palette. Once you have dragged them on a toolbar then you can disable CTR and you should still see those items on the toolbar (but no longer in the Customize palette) after you have restarted Firefox. You can alternatively edit the value of the browser.uiCustomization.state and add spring, separator, spacer items with a unique number appended to the value of this pref in the position where you would want them to appear. You should have the item(s) on the toolbar after you have restarted Firefox.
"customizableui-special-separator##" "customizableui-special-spacer##" "customizableui-special-spring##"
Thanks, but I won't install CTR. I'm looking for a straight solution. Your suggestion "spring, separator, spacer" doesn't work.
What did you add to the browser.uiCustomization.state pref?
- [/questions/1081480] Who do we query at Mozilla to bring back SPACE and SEPERATOR buttons?!
I give up. All I wanted is to center the bookmarks. not a headache.
All you would have to do is temporarily installing an extension that supports the special elements and drag the spring item to the left and right of the Bookmarks Toolbar items and uninstall this extension. If you do not want to do this in your current profile then try it out in a new profile to see how this shows in browser.uiCustomization.state.
Paste this in the place of "PersonalToolbar":["personal-bookmarks"]:
"PersonalToolbar":["customizableui-special-spring186","personal-bookmarks","customizableui-special-spring187"]
Modify the pref directly via the about:config page or do not use "Pretty Print" in the Scratchpad as that changes double quotes to single quotes. Close and restart Firefox after having modified browser.uiCustomization.state
EDIT: It seems to work better with only a spring button at the start.
"PersonalToolbar":["customizableui-special-spring186","personal-bookmarks"]
{"placements":{"PanelUI-contents":["edit-controls","zoom-controls","new-window-button","privatebrowsing-button","save-page-button","print-button","history-panelmenu","fullscreen-button","find-button","preferences-button","add-ons-button","developer-button"],"addon-bar":["addonbar-closebutton","status-bar"],"PersonalToolbar":["customizableui-special-spring186","personal-bookmarks"],"nav-bar":["urlbar-container","search-container","bookmarks-menu-button","pocket-button","downloads-button","home-button","loop-button"]},"seen":[],"dirtyAreaCache":["PersonalToolbar","nav-bar"],"currentVersion":4,"newElementCount":0}
Modified