How to set the width of a table column

A

AAaron123

I have a table with two columns of cells.

I like the left column to be no more than 20% of the browser's width.

I tried setting a left column's cell width to 20%, tried setting a right
column's cell width to 80%, tried setting both columns (20% and 80%), tried
using style and width attributes.

In all cases the browser (IE8 mostly) seems to adjust the left column to the
data in it and, as I move its right edge to the left, cover the right
column.

Do you know a work around?


Thanks
 
S

Stan

I have a table with two columns of cells.

I like the left column to be no more than 20% of the browser's width.

I tried setting a left column's cell width to 20%, tried setting a right
column's  cell width to 80%, tried setting both columns (20% and 80%), tried
using style and width attributes.

In all cases the browser (IE8 mostly) seems to adjust the left column to the
data in it and, as I move its right edge to the left, cover the right
column.

Do you know a work around?

Thanks

For this to work you have to ensure that the table width is set to
some absolute value (e.g. e.g. in pixels)

If you rely on default values the results vary with different browsers
and is unreliable.
 
A

AAaron123

I have a table with two columns of cells.

I like the left column to be no more than 20% of the browser's width.

I tried setting a left column's cell width to 20%, tried setting a right
column's cell width to 80%, tried setting both columns (20% and 80%),
tried
using style and width attributes.

In all cases the browser (IE8 mostly) seems to adjust the left column to
the
data in it and, as I move its right edge to the left, cover the right
column.

Do you know a work around?

Thanks

For this to work you have to ensure that the table width is set to
some absolute value (e.g. e.g. in pixels)

If you rely on default values the results vary with different browsers
and is unreliable.

Sounds like I can't have what I want.
I'd like the table to use all the width the browser gives it.
And the left column to use no more than 20% of that width.

No way to do that?

Thanks

PS Seems I remember years ago that * meant "whatever was left"
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top