You are on page 1of 7

CSS - layout

CSS display
specifies if an element is displayed and how
types of elements:
block starts on a new line, occupies all the available space
inline takes only the space necessary (span, a)
none used to hide an element
display:none vs visibility: hidden visibility:hidden affects the layout
as it keeps the space for the element in the layout
Position
type of positioning for an element
static default value
relative (followed by left, right, top) positions relative to the normal
position
fixed the element stays the same place even if the page is scrolled
absolute: positioned relative to the nearest ancestor (or body if it hasnt any
other ancestor)
Float/clear
float specifies if an element should float
clear specifies if around an element floating elements are allowed
to float or not
overflow: auto keeps an element for flowing outside its container
CSS Units
CSS Absolute units
see also:
http://www.w3schools.com/cssref/css_pxtoemconversion.asp

You might also like