XUL Programmer's Reference Manual

<bulletinboard>

Attributes Common Children
id titledbutton
width text
height img
style box
   

The <bulletinboard> gives you full positioning control over its child elements. The following example demonstrates the use of the height and width attributes on the bulletinboard itself, and the style, top, and left attributes all being used to position the child elements within the space of the bulletinboard.

<window id="main" 
	align="center" 
	valign="middle" 
	autostretch="never" 
	xmlns:html="http://www.w3.org/TR/REC-html40" 
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > 
  
  <bulletinboard width="300px" height="300px" > 
	<image id="firstone" src="chrome://global/content/logo.gif" top="10px" left="0px"/>  
	<image id="secondone" src="chrome://global/content/logo.gif" style="top:100px; left:180px;"/> 
  </bulletinboard> 
</window>

Given a bulletinboard arranged like the one above, you can use the XUL DOM to change the location of the child elements by changing the value of their top or left properties, as in the following snippet of code:

var c1 = document.getElementById("firstone");
c1.setAttribute("top", "100");

 

width
Description
width specifies the width in pixels of the bulletinboard element.
Syntax
<bulletinboard width="number of pixels wide" />
Example
<bulletinboard height="300" width="200px" />
Notes
The "px" at the end of the number value is optional.

 

 

height
Description
width specifies the height in pixels of the bulletinboard element.
Syntax
<bulletinboard height="number of pixels wide" />
Example
<bulletinboard height="200px" width="300" />
Notes
The "px" at the end of the number value is optional.

 

 

style
Description
width specifies the width in pixels of the bulletinboard element.
Syntax
<bulletinboard width="number of pixels wide" />
Example
<bulletinboard width="200px" />
Notes
Though using the style attribute can be a somewhat indirect way of dealing with XUL elements, you can use style to set the top and left attributes of the children of a bulletinboard, as in the example above. Note that if you use style, you must then use "px" to specify pixels.

 

 


 
 
Last updated: 1/3/01 Ian Oeschger