• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 21. Cascading Style Sheets and C... > Positioning and Block Attributes

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.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint