Closed Bug 14139 Opened 21 years ago Closed 21 years ago
Div doesn't enforce its minimal size
Example: <div style="float:left;width:10px">Floated</div>some text Expected behaviour: The div should take the minimal size based on it's content. Actual behaviour: The div gets sized to 10 pixel, which causes _overlapped_ text. Regression: Occurs on: 1999-09-16-08 apprunner (Win98) Doesn't occur on: NS 4.51, IE 4
Summary: Floated div doesn't enforce it's minimal size → Div doesn't enforce its minimal size
Correction: This happens on non-floated div's too: <div style="width:10px;background:red">Shrunken</div> Changing title from "Floated div doesn't enforce it's minimal size" More comments: Testing inside table cells reveals that the <div> forwards 10px as its minimal width, but the width of the inside text as its maximal width. (See the second attachment.)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
This is an example of where you can't look at IE or Navigator as the definition of how it should look. They're both wrong when it comes to this area A 'width' specification of '10px' means that the content area of the element's box is 10px. At least for in the flow block-level non-replaced elements. Section 10.3.3 of the CSS2 spec describes how the computed width is calculated. Section 11.1.1 describes what happens if the element's content overflows the content area. The deafult value for 'overflow' is 'visible', which means that the overflow is visible. It does _not_ mean that the parent element's box is expanded, however. That's why you see a 10 pixel red area and text extending outside on the right. We're doing exactly what the spec says we should do.
Based on troy's comments, marking as verified invalid.
You need to log in before you can comment on or make changes to this bug.