Friday, May 23, 2008
Divs or Tables
It has often been suggested that we use divs for layout of items instead of tables in HTML. Normally, the divs would be fine but when it comes to setting the background for the 'columns' created by divs, you would realise that the divs aren't the same size. This is due to the fact that, unlike table cells, divs do not change their height to match horizontally neighbouring divs. The workaround to the issue involves creating a wrapper div and setting the background color in the wrapper and setting a transparent background for the actual column. This creates just as much clutter as a table so everyone in the web design and development world hope CSS3 changes things for the better.