A Step toward Tableless Design
Left Aligned Text | Right Aligned Text |
<table border=”0″>
<tr>
<td>Left Aligned Text</td>
<td>Right Aligned Text</td>
</tr>
</table>
And this is how I ended up doing it using CSS:
<div class=”leftAlign”>Left Aligned Text</div><div class=”rightAlign”>Right Aligned Text</div>
Though I have to add the following entries in my CSS file but as these will be cached in the browser, it will not require reloading of the presentation data again and again. I see two main advantages of using CSS technique over the HTML layout. First is that my code is more compact and will load fast, second is that the new code is easy to read and maintain
div.leftAlign {
float: left;
} div.rightAlign {
float: right;
}
For some of you interested in reading more, please check the following related links:
http://www.gtalbot.org/NvuSection/NvuWebDesignTips/TableVsCSSDesign.html
http://www.stopdesign.com/articles/throwing_tables/
http://www.alistapart.com/articles/practicalcss/
http://w3tableless.com/
My favorite quote of the day is “Look Ma, No Tables!”
Tags: CSS, HTML, Layout, Table Vs CSS, Tableless
This entry was posted
on Saturday, March 1st, 2008 at 7:24 pm and is filed under HTML.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Feedback & Comments
No Responses