Positioning and Block Attributes


A popular use of style sheets is to position elements in pages, and we've already discussed relative and absolute positioning in this chapter. You can find some positioning and block style attributes in Table 21.4.

Table 21.4. Positioning and Block Style Attributes

Attribute

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

bottom, top, left, right

   

x

x

x

x

x

x

x

x

 

CSS2: <length> <percentage> auto inherit

 

Default: auto

 

Applies to: All elements

 

You position a box with these properties, which specify how far a box's bottom, top, left, or right content edge should be set from the box's containing area.

direction

             

x

x

x

 

CSS1: ltr rtl

 

CSS2: inherit

 

Default: ltr

 

Applies to: All elements

 

Gives the writing direction of HTML blocks for the Unicode bidirectional algorithm ( left-to-right or right-to-left ).

display

   

x

x

   

x

x

x

x

 

CSS1: inline block list-item CSS2: run-in compact marker table inline-table table-row- group table- header-group table-footer-group table-row table- column-group table-column table- cell table-caption none inherit

 

Default: inline

 

Applies to: All elements

 

Indicates how various elements should be displayed. Note that implementation of this attribute is spotty as of yet.

float

   

x

x

   

x

x

x

x

 

CSS1: left right none

 

CSS2: inherit

 

Default: none

 

Applies to: All but positioned elements

 

Specifies whether a box should float to the left or right as needed.

position

   

x

x

   

x

x

x

x

 

CSS2: static relative absolute fixed inherit

 

Default: static

 

Applies to: All elements

 

Specifies how to position an element (which affects how the browser uses attributes such as left and top ).

z-index

   

x

x

   

x

x

x

x

 

CSS2: auto <integer> inherit

 

Default: auto

 

Applies to: Positioned elements

 

Sets the stacking level of the box in the stacking order for positioned boxes. Enables you to specify which elements appear on top of which other elements.



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