Web design creating cool web sites with html, xhtml, and css

Page 317

290

Creating Cool Web Sites with HTML, XHTML, and CSS

This example represents quite a lot of JavaScript, but it’s really rather straightforward: If id1 already has a higher z-index value than id2, the function has nothing to do and exits directly. If id2 is already at 100, id1 can’t be one higher, so id2 must decrement by one, which you do by using the -=1 shortcut. Finally, id1’s z-index is set so that it’s one higher than id2’s z-index.

Table 12-3: CSS Styles Covered in This Chapter Tag

Meaning

margin

Specifies spacing between container contents and surrounding material

margin-left

Specifies left margin setting only

margin-right

Specifies right margin setting only

margin-top

Specifies top margin setting only

margin-bottom

Specifies bottom margin setting only

padding

Specifies spacing between container contents and container edge

padding-left

Specifies left padding setting only

padding-right

Specifies right padding setting only

padding-top

Specifies top padding setting only

padding-bottom

Specifies bottom padding setting only

border

Specifies color, style, and size of container border element (other values include border-left, border-right, border-top, or borderbottom).

width

Specifies container width

height

Specifies container height

float

Specifies container’s relationship container to surrounding material

position

Specifies container’s position on page.

top

Specifies position of container’s top relative to its parent container

left

Specifies position container left side relative to its parent container

overflow

Determines what Web browser does with content that doesn’t fit in con­ tainer (must define a clipping region with clip)

clip

Defines a clipping region to use with overflow attribute

visibility

Indicates whether container is visible or not

display

Controls container visibility and flow in page layout

zindex

Specifies container’s relative z-index value


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.