[Project_owners] Wrapping XUL elements

Neil Deakin enndeakin at sympatico.ca
Fri Jun 22 07:44:39 PDT 2007

Christopher Finke wrote:
> On 6/22/07, Neil <neil at parkwaycc.co.uk> wrote:
>> Both the <label> and <description> elements support wrapping text.
>> Simply set the text as the .textContent rather than as the .label, or in
>> the XUL as <description>This text will wrap</description>. Note that
>> they prefer not to wrap, so you typically need a max-width style to
>> force the issue.
> I need to wrap a set of XUL elements though, not text.  Imagine a box
> with 100 button elements in it.  I want the buttons to wrap to
> multiple rows once they reach the right edge of the box, not force the
> box to expand.

There isn't an official way to do this. Currently, however you could put 
the elements inside an element with display: block and you will get the 
desired effect. This technique won't necessarily work in the future though.

/ Neil

More information about the Project_owners mailing list