CSS Layout Tutorial
CSS has many ways to create layout and layers.
Here are the major methods.
Using Table Layout
Flow Around Blocks
The float
property can make text flow around a image or a block element.
See: CSS Text Flow Around Image
Using Margin
Margin can be used to create several columns or panes.
Multi-Column Layout
Create Layer
CSS Position: static, relative, fixed, absolute
Hide Element
A element can be hidden by:
visibility: visible
- normal.
visibility: hidden
- maket it invisible, but it still occupies the same space.
display: none
- make invisible and occupies no space. (effectively as the element doesn't exist.)
These are useful especially when used together with JavaScript. For example, for collapsible list, popup tooltip.
[see How to Create Tooltip]