Closed Bug 197306 Opened 22 years ago Closed 22 years ago

form elements enclosed in div overwrite the edge of the div in narrow browser window

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: lori.k.brown, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 View the URL above in Mozilla (I am using 1.3 or so.) Slowly make the browser window narrower. The form elements and the fieldset that encloses them are inside of a div. The form elements overwrite the edge of the enclosing fieldset and div. Why does it do this? Shouldn't the size of the form elements set a sort of minimum width for the containing fieldset and div? It looks crummy to have the form elements sticking out the side of the containing elements. Don't tell me this is not a bug, but a feature. I will disagree! Reproducible: Always Steps to Reproduce: 1. Create a form. 2. Enclose the form in a fieldset, or a div, or both. Set the width of the fieldset or div w/ a percentage. Give the enclosing elements a style w/ a background color, so that the offending behavior is more evident. 3. View the page in a narrow browser window. Actual Results: The form elements stick out of the div / fieldset that enclose them. Expected Results: THe width of the form elements should establish a minimum width below which the div or fieldset will not shrink. Containing elements should fully enclose elements that enclose them.
> Don't tell me this is not a bug, but a feature. I will disagree! It's not a "feature", it's a conformance requirement for CSS2. Any other behavior would violate the CSS2 layout model. > Shouldn't the size of the form elements set a sort of minimum width for the > containing fieldset and div? Normally it would, but the site has explicitly overridden the margins of the <fieldset>. This means that the margins cannot become negative, thus that the width of the fieldset cannot become larger than the width of its parent (which is constrained by the width of the browser window, since the site has made no provisions to the contrary). Simply not setting margins on the <fieldset> would "fix" this problem. So would setting a min-width on the fieldset, if that is what's desired.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.