How can I stretch a DIV to 100%, without streching its auto-width parent element?

Posted by Chris... S... on Stack Overflow See other posts from Stack Overflow or by Chris... S...
Published on 2010-12-27T22:51:18Z Indexed on 2010/12/27 22:53 UTC
Read the original article Hit count: 114

Filed under:
|
|

Given a formular with several fieldsets:

<form>
 <fieldset id="a"></fieldset>
 <fieldset id="b"></fieldset>
</form>

All fieldsets are to have the same width, whereas it should be the width of the broadest fieldset. The form element has no explicit width.

How can I achieve that?

I thought width: 100% would do it, but it will stretch the form element to window size.

© Stack Overflow or respective owner

Related posts about html

Related posts about css