I need for my extension to move the bar with tabs (a <toolbar>
element with ID TabsToolbar
) to the bottom of the window, under the #browser
<hbox>
element.
I know how to add and modify elements with extensions, but I'm not sure how to place an existing element somewhere else in the page with an overlay. What is the proper way to do this?
UPDATE:
I found another add on that does this among other things, called https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/.
It appears that when tabs are set to the bottom, this plug adds an empty <toolbox>
element with id tabmix-bottom-toolbox
below the #browser
<hbox>
element. Even though the tabs appear on the bottom, the actual tab XUL markup is still in it's regular place inside the TabsToolbar
<toolbar>
element at the top.
I think what the author does is:
- Insert a XUL placeholder element under the browser area, and set the placeholder to the height of the TabsToolbar.
- Then give TabsToolbar a fixed position via css, and
- Set the "top" property based on the offset of the placeholder.
I haven't confirmed this yet by trying it in my own plug-in though. I've also found that absolute positioning does wonky things in XUL.