Forum Moderators: not2easy

Message Too Old, No Replies

cell padding help

css margin wont work.

         

neveremail

10:12 pm on May 31, 2005 (gmt 0)

10+ Year Member



I have in css file:

table.table3 {
border: solid White;
background: Blue;
}

tr.td1 td{
border: thin solid White;
background: #94C4FE;
margin: 12px;
}

And in HTML:

<table width="95%" align="center" class="table3">
<tr bordercolor="#990099" class="td1">
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
</tr>
<tr bordercolor="#990099" class="td1">
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
</tr>
<tr bordercolor="#990099" class="td1">
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
</tr>
<tr bordercolor="#990099" class="td1">
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
<td>
<div align="center">a</div></td>
</tr>
</table>

But I get no cell padding between cells.

Any Ideas?

tedster

10:44 pm on May 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would say use an actual cellspacing attribute in the HTML. It's not very css-purist but it's also not deprecated.

I believe the CSS2 property that "should" do this job is border-spacing [w3.org] -- but there next to no browser support for it right now.