force column width in a table?

D

David

Hi,

I want to ensure one column in a table is always the same number of pixels
wide no matter what the screen resolution is set to on the visitors PC - the
other two columns can wrap away top their hearts content.

How do I do this please? The code below doesn't do it.

<table border="1" width="100%">
<tr>
<td width="180" valign="top">&nbsp;</td>
<td width="*" valign="top">&nbsp;</td>
<td width="*" valign="top">&nbsp</td>
</tr>
</table>
 
E

Evertjan.

David wrote on 04 jul 2003 in comp.lang.javascript:
Hi,

I want to ensure one column in a table is always the same number of
pixels wide no matter what the screen resolution is set to on the
visitors PC - the other two columns can wrap away top their hearts
content.

How do I do this please? The code below doesn't do it.

<table border="1" width="100%">
<tr>
<td width="180" valign="top">&nbsp;</td>
<td width="*" valign="top">&nbsp;</td>
<td width="*" valign="top">&nbsp</td>
</tr>
</table>

A bit strange but it works (IE6):

<table width="100%" border=1>
<tr><td width="105px">
<div style="width:105px;overflow:hidden;">
qwertyqwertyqwertyqwertyqwertyqwertyqwerty
</div>
</td><td>
xxxxxxxxxxxxxx
</td><tr/></table>
 
D

David

A bit strange but it works (IE6):

<table width="100%" border=1>
<tr><td width="105px">
<div style="width:105px;overflow:hidden;">
qwertyqwertyqwertyqwertyqwertyqwertyqwerty
</div>
</td><td>
xxxxxxxxxxxxxx
</td><tr/></table>


Thanks - it's a bit of a shame as the IE page works fine, the page I'm
working on is the one optimised for Netscape :(

I think I'll have a rethink.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top