This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2005 > Re: Using CSS width 'auto' value to automatically justify table column





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Using CSS width 'auto' value to automatically justify table column
Jim Moe

2005-12-19, 7:06 pm

bissatch@yahoo.co.uk wrote:
>
> How do I set the width of each column within a table? Would I use the
> auto value for width? I tried to do:
>
> #mytable td { width: auto; }
> ...but no luck.
>

What luck are you hoping for?
There are a number of ways to set the width of columns. The one you show
is one but you chose the default for <td>. Using a % or a fixed width
value to set the (minimum) width for all columns in #mytable.
You could use a class to define a width.
There is <colgroup> to set the width for individual columns, or groups
of columns.
You could use the "width" attribute for the <td> element.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews