View Single Post
  #12 (permalink)  
Old 10-12-2005, 04:06 AM
hphoto hphoto is offline
WebProWorld New Member
 

Join Date: Oct 2005
Posts: 5
hphoto RepRank 0
Default Re: Why CSS instead of Tables - Because you save bandwidth

It is not difficult to learn CSS/HTML and to hand-write all your code, instead of using WYSIWYG editor and it's all worth it.
One of the benefits of using CSS is SAVING BANDWIDTH.

Look for example:
Example 1 - HTML code with table:

<table <table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top" align="center"> column 1 </td>
<td width="620" valign="top" align="center"> column 2</td>
</tr>
</table>


Example 2 - HTML code with css

<div class="n1"> column 1</div>
<div class="n2"> column 2</div>

and you define all the classes' properties in .css file
.n1 {float:left; text-align:center; width:180px;}
.n2 {float:left; text-align:center; width:620px;}


As you can clearly see, in example 2 (the CSS code) you need less characters in your HTML code.
When you are dealing with big websites(many web pages) or busy websites (lots of traffic), then "less characters" will transform in lighter web pages and a lot of bandwidth saved.


-----------------------
Holiday Photos
Reply With Quote