Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting html controller to right side in firefox extension

I am creating Mozilla extension. Here I need to set button controller right side in extension. Here I divide XUL file to div element. I have take a main div element and inside this i have take two more inner div. Then I have set one inner div style property float:left; and another div style property float:right. But this is not helpful for me. Here I also set Button CSS style property float:right which is inside the div which have property float:right.

like image 639
Yashwant Kumar Sahu Avatar asked Nov 15 '22 04:11

Yashwant Kumar Sahu


1 Answers

In a XUL window, dialog, page or vbox, elements are displayed from top to bottom, and if you put elements in an <hbox> then those are displayed left to right (except in RTL locales). But sometimes you want a right-aligned object. You then have several options:

  1. The simplest version is <hbox pack="end"><button label="right"/></hbox>
  2. If you also need an element on the left, then you can separate them with a spacer, like this: <hbox><button label="left"/><spacer flex="1"/><button label="right"/></hbox>
  3. Alternatively you can also use <vbox align="end"><button label="right"/></vbox> which works better if you need a radio, checkbox, label or description element to be able to wrap.
like image 81
Neil Avatar answered Dec 21 '22 02:12

Neil