Click to See Complete Forum and Search --> : Help: Fixing the width of a TD??


Seboko
02-13-2006, 05:29 AM
Does anybody know how I can fix the width of a TD element without inserting an image in it??

I have something like:

<table>
<tr>
<td width="180"> Hello there </td>
<td> Yebo yes </td>
</tr>
</table>

I want the width of the cell containing 'Hello there' to stay 180 even when I resize my browser. But it does not. I know that if I replace the 'Hello there' text with and image of width 180 then the width will be fixed. i.e

<td> <img src="hello.jpg"/> </td>
will ensure the TD is does not go below 180 pixels even when the browser is resized.

IS there a way of ensuring that the TD size is fixed without inserting an image???

pcthug
02-13-2006, 06:06 AM
you must specify a unit of measurement (px, %, em, pt, etc.) for any value, excluding 0 of course;

<td width="180px"> Hello there </td>