The COL and COLGROUP Elements


The <COL> and <COLGROUP> Elements

The <COL> and <COLGROUP> elements create and group columns together. Although the in-depth HTML for these elements is beyond the scope of this book, you can see an example using the <COL> and <COLGROUP> elements in Listing 14.10, where I've created a few columns with the <COL> element and grouped them together with the <COLGROUP> element. You can find the properties of these elements in Table 14.19. JavaScript's core HTML properties, methods , and events, which we covered in Chapters 5 and 6, also apply to these elements as well.

Table 14.19. The Properties of the <COL> and <COLGROUP> Elements (See Chapters 5 and 6 for the JavaScript core HTML properties, methods, and events that also apply to this element.)

Property

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

align

     

x

   

x

x

x

x

 

Read/write

 

Sets or gets the alignment of the element. Set to "center" (aligns to the center), "justify" (aligns to the left and right edge), "left" (the defaultaligns to the left edge), or "right" (aligns to the right edge).

ch

     

x

         

x

 

Read/write

 

Corresponds to the CHAR attribute, but doesn't actually do anything in either browser yet.

chOff

     

x

         

x

 

Read/write

 

Corresponds to the CHAROFF attribute, but doesn't actually do anything in either browser yet.

span

     

x

   

x

x

x

x

 

Read/write

 

Sets or gets the number of columns in the group.

vAlign

     

x

   

x

x

x

x

 

Read/write

 

Sets or gets how contents are aligned. Set to "middle" (the defaultaligns the text in the middle), "baseline" (aligns to the base line), "bottom" (aligns the text at the bottom), or "top" (aligns the text at the top).

width

     

x

   

x

x

x

x

 

Read/write

 

Sets or gets the width of the element, in pixels. Set to an integer.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net