[thelist] Accessing table cell properties with CSS?

James Aylard evolt at pixelwright.com
Tue Jul 2 12:22:00 CDT 2002


Tom,

> Ok, this is going to sound really backward (and I think I am barking
> up the wrong tree) but - is there anyway to control the Width of a TD
> with CSS? I cannot seem to do it. You might ask why...

    I was away last week, so I'm more than a bit late on this post. Since
you seem to already have a workable answer, consider my post just a bit of
superfluous edification... :)
    CSS does have a way to enforce the widths of table cells, using the CSS
2 property "table-layout" with a value of "fixed", e.g.:

<style type="text/css">
  table {
    table-layout: fixed ;
  }
  #td1 {
    width: 298px ;
  }
</style>

[...]

<table>
  <tbody>
    <tr>
      <td id="td1">blah</td>
      <td>Link stuff here</td>
    </tr>
  </tbody>
</table>

hth,
James Aylard




More information about the thelist mailing list