Wednesday, April 11, 2007

Understanding layout with CSS

If you find yourself banging your head against the wall when using CSS, strictly for your layouts, then I can bet the London Bridge that you have not yet acquainted yourself with concepts like normal flow, box model, and how these come into play when using float and positioning.

I wasn’t able to really use CSS for layouts myself until I took some time out to try and get a handle on these concepts. Before then it was more of trial and error.

The normal flow explains the default flow (positioning) of your XHTML elements.
The Box model explains how the browser renders individual XHTML elements
While float and positioning allows you to specify the position of XHTML elements outside the normal flow.

I should be able to, one of these days, sit down and write a comprehensive tutorial on these concepts, but while I wait for that time, I suggest you rather Google the web for tutorials already out there.

No comments: