Mozilla XUL Element and Script Reference

Contents  Quick Reference

Text

A piece of text. It can be used as a label for another element by using the for attribute. The text does not wrap so text only appears on one line. If the text does not fit, it will be cropped according to the crop attribute.

Attributes:

Attributes inherited from XUL Element


crop

If the label of the text is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be placed in place of the cropped text.

flex

Indicates the flexibility of the text. Flexible elements grow and shrink to fit their given space. The actual value is not relevant unless there are other flexible elements with-in the same container. Elements with larger flex values will grow more than elements with lower flex values, at the ratio determined by the two elements.

for

The attribute is used when the text element is used as a label and is similar to the for attribute on an HTML label. It should be set to an element that the label is associated with. When the user clicks on the label, the associated element is given the focus.

height

The height of the text in pixels. It is recommended to use the CSS height property instead.

left

For elements placed within a bulletinboard, specifies the position of the left edge of the text.

orient

Used to specify whether the children of the text element are oriented horizontally or vertically.

top

For elements placed within a bulletinboard, specifies the position of the top edge of the text.

value

The label that will appear on the text. If this is left out, no text appears.

width

The width of the text in pixels. It is recommended to use the CSS width property instead.