CSS-Lesson 12

Position

The position property can have one of four values:

Note the distinction between absolute and fixed positioning.

Height

height

The height property can have one of the following four values:

min-height

This property means that an element can be higher, but not shorter than the given value.

max-height

This property means that an element can shorter, but not higher than the given value.

Width

The properties width, min-width and max-width are defined in a similar way as height.

Positioning details

top, right, bottom, left

Elements can be positioned within their containing element by a pair of these properties, either top or bottom and either left or right.

z-index

Sometimes one element needs to be able cover up another element. Look at the drop down menus above. This done with a higher z-index.

float

The 'float' property can have the values 'left' or 'right'

Previous Lesson previous lesson next lesson Next Lesson