http://www.chrispearson.org/pages/programming/html/LayoutTables/default.asp
09h36
Wednesday, 8. October 2008

HTML PAGE LAYOUT

Most people coming from paper-based media expect web page editors to give them the same kind of control they are used to finding in desk-top publishing.

There is a sad fact the just has to e accepted: You can't apply absolute layout to a web page. Even if you use layers - which seem to offer a great option for total positioning control - there will always be visitors to your site who use browsers that don't recognise CSS style sheets.

In the past I have used JavaScript to return information on the user's current window dimensions and then to resize page elements for the current resolution and window size. This resulted in some fairly code-intensive pages that often did manage to present exactly the same page in 1024 x 768 resolution as in 640 x 480. Unless, of course, the site visitor has script execution switched off. Or they're loading the page into Adobe Acrobat.

It seemed to me that the best approach might be to throw away all the leading-edge technology and everything else that might just be browser-specific. At least as far as basic layout is concerned, anyway. Back, in fact, to some very basic HTML. Back, in fact, to the HTML that was around when IE3 and NN3 were bright young things at the very cutting edge of web technology. Tables. Looking at the source of HTML pages on a number of sites convinced me that a lot of web developers had come up with the same idea, too.

Tables have been a fundamental of HTML pages since way back, well before the 3-versions of the popular browsers, and they are therefore fully supported by all browsers. And their rendering is quite standard across the range, too. And tables, by their nature, impart structure.

Next page >

xxx,xxx

copyright ©2000 - 2008 Chris Pearson