PDA

View Full Version : column width to expand and contract with text


PFunk
03-02-2006, 01:34 AM
Hi,

I have a series of tables on a page which have a text label on the left and a form input (could be any of text, checkbox, drop down) and the behaviour I would like is:

- The width of the left column is dictated by the text in that column, i.e. it will expand as wide as it can before hitting the form input to fit the text, or will wrap tightly around the text if there is very little.

Using nowrap and setting the left column width to a low percentage almost works, but pushes the form inputs off the page.

Happy to accept table or css solutions if someone can get it to work!

felgall
03-02-2006, 09:47 PM
Does removing all of the width references fix it? It should then allocate the width based on the content of the table.