Is it possible in CSS to have a block level element that will expand its width to fit its contents?

I have a block level element (a form) containing <select> fields, the values of which are drawn from a database. Therefore, the width of these <select> fields will be unknown, so I need the form width to be flexible and to expand if need be.

I have read about using inline-block for the display property, which from initial tests seems to do the job. However, is this the best way to go, or would you suggest another way?

Thanks,
Stephen
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to