Creating a Page Layout
Using Divs
Divs make it easier (in some ways) to do layouts which can be managed and updated over time compared to layout out information via tables. Divs also make file sizes smaller than using tables in almost all cases.
Creating the Page
- Create the Page (define body level generic CSS defaults)
- text-align: center - for IE6 centering
- Create the outer wrapper (div) - useful for centering the page if necessary
- text-align: left - to fix IE6 centering
- margin left and right - auto - to center in standards complient browsers
- width: define width appropriately
- Set up primary divisions, name them with IDs appropriately
- header
- footer
- content
- menu - this may be in the header depending upon style
- sidebar - optional, and may vary in relation to content depending upon if it is to the left or the right
- Define CSS for each of the main divisions