View Single Post
  #6 (permalink)  
Old 03-22-2004, 09:03 PM
matauri matauri is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Western Australia
Posts: 2,105
matauri RepRank 0
Default Tables & CSS formatting

Tables & CSS Formatting

You may have noticed that there are a lot of deprecated attributes in relation to tables. Many have asked how to validate with this happening. The solution: put all your formatting in your CSS (style sheet) file, or in your <style> tags. Below is an example how to do this for a basic table setup.

All attributes below are just examples, customize to suit.

HTML File:
<table class="one">
<tr><td>text/image</td><td>text/image</td></tr>
<tr><td>text/image</td><td>text/image</td></tr>
<tr><td>text/image</td><td>text/image</td></tr>
<tr><td>text/image</td><td>text/image</td></tr>
<tr><td>text/image</td><td>text/image</td></tr>
<tr><td>text/image</td><td></td></tr>
</table>

CSS File:
table.one {
width: 80%;
border: 0.05em #6699CC solid;
border-collapse: collapse;
}

table.one td {
text-align: center;
font-family: Arial, Helvetica, Verdana, sans-serif;
font-weight: normal;
font-size: 0.80em;
color: #404040;
width: 50%;
background-color: #fafafa;
border: 0.05em #6699CC solid;
border-collapse: collapse;
}

End Product:




.
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote