Layout Via Divisions Relevant Properties
Layout Via Divisions: Example (1)
A common layout of the top-level
div elements is the following
with the width of header, nav,
main, footer fixed to a value
between 900px and 1000px
# h eader { width : 1000 px ;
he ight : 100 px ;
backgr ou nd - co lo r : b lue ;
ma rgin : auto ; }
# nav { wi dt h : 1000 px ;
he ight : 50 px ;
backgr ou nd - co lo r : green ;
ma rgin : auto ; }
# main { width : 1000 px ;
ma rgin : auto ; }
# c onten t { width : 800 px ;
he ight : 400 px ;
backgr ou nd - co lor : yellow ;
float : left ; }
# ads { wi dt h : 200 px ;
he ight : 400 px ;
backgr ou nd - co lo r : orange ;
float : r ig ht ; }
# f ooter { width : 1000 px ;
he ight : 50 px ;
clear : both ; margi n : aut o ;
backgr ou nd - co lo r : b lue ;}
http://cgi.csc.liv.ac.uk/
~
ullrich/COMP519/examples/layout1.html
COMP519 Web Programming Lecture 8 Slide L8 – 6