CSS => Replacement for a dynamic table?

admin

Administrator
Staff member
Hi all! I am using php to output data a row at a time. The number of rows is not fixed but depends on the amount of data. Is it possible to produce similar output with CSS without using tables at all? Also number of columns may change from one table to another.

Here is the table:

<table border="1" cellspacing="0" cellpadding="6">
<tr><th>Nameserver</th><th>TTL</th><th>Record</tr></tr>
<tr><td> a.gtld-servers.net </td><td> 172800</td><td> 192.5.6.30 </td></tr>
<tr><td> g.gtld-servers.net </td><td> 172800</td><td> 192.42.93.30 </td></tr>
</table>What you have there is a good example of the correct way to use tables.Thanks for that! Is this compatible with XHTML 1.0 Strict?with the exception of this: border="1" cellspacing="0" cellpadding="6"
it's all goodThis is better and it validates. You could also take the border attribute out of the table tag and paint your borders with css...
<table border="1" cellspacing="0" cellpadding="6">
<thead>
<tr><th>Nameserver</th><th>TTL</th><th>Record</th></tr>
</thead>
<tbody>
<tr><td> a.gtld-servers.net </td><td> 172800</td><td> 192.5.6.30 </td></tr>
<tr><td> g.gtld-servers.net </td><td> 172800</td><td> 192.42.93.30 </td></tr>
</tbody>
</table>with the exception of this: border="1" cellspacing="0" cellpadding="6"
it's all good
I was wondering about those, but if you go here : <!-- m --><a class="postlink" href="http://bonrouge.com/test/1-strictx-dtd.htm">http://bonrouge.com/test/1-strictx-dtd.htm</a><!-- m --> and validate that page, you'll see they pass.Thanks for the input!
 
Back
Top