what i mean is people usually overuse the tables
this post doesn't start good I already contradicted myself..but none the less, i'll continue.
First of all table are very "precise" way of displaying any kind of information
Code: Select all
image
texte
or whatever you want to showthis code will look the same, weather it is on IE or NS...
Code: Select all
<table width="731" height="111" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="412" height="111"> </td>
<td width="319" height="111" class="textearial">some texte layout</td>
</tr>
</table>Code: Select all
<div id="nicelookingname">
that's it
</div>well you are right there is something missing called Cascading Style Sheets or CSS.
Now now whats css.. well i won't explain here So if you don't know just go here Check That.
Now since we were missing css let's add it
Code: Select all
#main {
position: absolute;
left: 0px;
top: 5px;
width: 100%;
height: 450px;
padding-bottom: 5px;
background-color: #ffffff;
background-image: url(../images/bg_main_fr.jpg);
background-repeat: no-repeat;
}table you can pretty much be sure it'll show everywhere like you intend too..
well first, get off your mind that HTML should be easy..(it's an easy language), it's not easy to code properly with it..
I'll tell you why I use css instead of table
1- Changes : you site will continuously change ( background color font whatever) and a table can be very hard to play with once it's done..(i'm talking about complicated site here) Css on the other hand.. if i want to change something it'l quickly apply everywhere on my site.
2- Speed : Table espeacially when you indent <table> into other <table> with spacers to coreectly output everything.. it's starting to take more time loading your page.. when properly design, a site made with css will always* be faster (*Never say always.. but hey i'm still talking over 90% of the time)
3- Validation : HTML (as xHTML) is a language where you should not have (or have a minimum) of code for the "output".. i mean you should never have
Code: Select all
<table width="100%" border="0" cellspacing="0" cellpadding="0">All the rest should go in a css file
Now when you have a complicated table to create..
ask yourself
1- Do i absolutly need table for this layout
If the answer is yes, your wrong (just kidding).. but usually you really are wrong.
Now then..
WHEN SHOULD WE USE TABLE ?
i'll tell you ..
FORMS or
Tabular (duh) way of showing things like in a shopping cart
yes forms.. that's it.. form usually have lots of "alignment" to make with checkbox and the likes..
that's where the table come in pay..
but other then that.. you should minimise your uses of <table></table>
Oh and don't forget Knowing that CSS can change a HOLE site in 2 sec..
Well you could design your site in conequence.
ex you apply a style sheet for a specific kind of texte (ex titles..)
so when you want to change all your titles and add let's say more space between the letters.. it'll literally will take you maybe a big 15 sec
You probably didn't read all of that .. did you !!!
nyways enjoy