kadircankaytaz
New Member
I want to make an HTML table. Let's say that it has 3 columns. I would like the first column's width to be fixed, and the other two columns expand/contract based on the available space and proportions between them.That can all done simply enough by setting a fixed-size width for the first column, and using percentages for the other two. But I want something harder.I want the browser to figure out the width itself.I want it to get the ideal width of the column and then make that the column's fixed width. Rather than me having to eyeball text and find a width, the browser can just get the text's natural width and set that to be the column width.This is something that is done fairly commonly in GUI layout grids, where you can have certain columns be of fixed size. The size is automatically determined by the size of the column's contents. The space left over after laying out the fixed size columns goes to the non-fixed sized ones.Is there some way to do that in HTML/CSS?Note that JavaScript is not an option here (it's in a wiki and I'd rather not introduce JavaScript there).