Closed Bug 195755 Opened 23 years ago Closed 23 years ago

Div's stack on top of each other if width is too narrow

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 192076

People

(Reporter: AstroDrabb, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 Go to the test url and look at the two snap shots. The two div's get stacked on top of each other if the div is not wide enough to contain the content. Ofcourse this can be fixed if the div width is made larger, however, this does not seem to be the appropriate way to fix. This happens is Moz 1.3b under winxp and moz 1.2.1 under Linux. Reproducible: Always Steps to Reproduce: 1. Go to test url and copy and past the html. 2. 3. Actual Results: Div's stacking on top of one another and content becomes garbled. Expected Results: Divs expand vertically to fit content.
The DIVs have their height set at 20px or 28px which is just enough room for one line. When there is enough text it will wrap to the next line which is outside of the DIV box. The reason IE renders it "correctly" b/c it assumes the author wanted the DIV taller. To fix it take out the height . And dupe of bug 192076
There are plenty of ways to fix this HTML. However, this is an issue for many sites that have sloppy HTML like this and it doesn't appear to render correctly in Mozilla. To you and I, we know that it is doing what the <div> says to do. I came across this issue while coding some stuff for a PeopleSoft Enterprise Portal. The code that messes up the <div> is hard coded in C++ that is proprietary to PeopleSoft, and which I cannot change. So in situations where the moz user has no control over the HTML, the page can look pretty ugly. I would have thought that the layout would be adjusted if the contents do not fit into the <div>/<td>/etc, instead of spilling out.
The layout cannot be "adjusted" without blatantly violating the CSS2 specification. *** This bug has been marked as a duplicate of 192076 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.