How to set the width of a table column

  • Thread starter Thread starter AAaron123
  • Start date Start date
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
 
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.
 
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"
 
Back
Top