Quick and Easy Div Layouts
Saturday, July 21st, 2007My sense is that, for some reason, most people have a tendency to code div layers layouts by using an <img> tag at the beginning of the <body> of the document for the header image, and then using absolute positioning to place the main content area and sidebar(s) in their appropriate locations. This method is flawed in that, in the absence of a stylesheet (as may be the case when viewing the website on an older browser), the header image still shows up, causing the page to look quite ugly (example). This is especially annoying if your header image has a large height. A better solution is to use a div image replacement, as I have done in ain’t afraid to die, featuring Dir en grey. I will use this layout as an example.