Closed
Bug 328257
Opened 18 years ago
Closed 15 years ago
width of li is not rendered properly when li is nested in a horizontal ul (eg. DHTML menubar)
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: petermichaux, Unassigned)
References
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Hi, Below is an HTML file that shows a simple little popup menu (with the popups visible.) In Safari 1.3.2 they look the same but in Firefox 1.5.0.1 the red box for "beta" is only as wide as the word beta. I think it should extend to the right across all the orange. The second version of the menu is the same but some JavaScript "repairs" the problem. Firefox bug? -Peter <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Bug?</title> <style type="text/css"> .JMenuItem {background: red;} .JMenu {background: blue;} .JPopupMenu {background: orange;} .JMenuBar {background: lightgreen;} .JMenuBar > .JMenu {display: inline;} .JMenuItem {position: relative;} .JPopupMenu {position: absolute;} .JPopupMenu {top: 100%; left:0;} </style> </head> <body> <ul class="JMenuBar"> <li class="JMenu JMenuItem"> firstItemFirstItemFirstItemFirstItemFirstItem <ul class="JPopupMenu"> <li class="JMenuItem">alphaalphaalpha</li> <li class="JMenuItem">beta</li> </ul> </li> <li class="JMenu JMenuItem"> nextItem <ul class="JPopupMenu"> <li class="JMenuItem">alphaalphaalpha</li> <li class="JMenuItem">beta</li> </ul> </li> </ul> <div style="height: 50px;"></div> <ul class="JMenuBar"> <li class="JMenu JMenuItem"> firstItemFirstItemFirstItemFirstItemFirstItem <ul class="JPopupMenu" id="id1"> <li class="JMenuItem">alphaalphaalpha</li> <li class="JMenuItem">beta</li> </ul> </li> <li class="JMenu JMenuItem"> nextItem <ul class="JPopupMenu"> <li class="JMenuItem">alphaalphaalpha</li> <li class="JMenuItem">beta</li> </ul> </li> </ul> </body> </html> <script> document.getElementById('id1').style.width = window.getComputedStyle(document.getElementById('id1'),null).width; </script> Reproducible: Always Steps to Reproduce: 1.View the HTML file in the Details section of this report. 2. 3. Actual Results: Incorrect rendering of li width. Expected Results: I expected the li to be as wide as it's containing ul
Comment 1•18 years ago
|
||
Reporter: Please do not post HTML testcases in the bug description or comments. Instead, after submitting a bug, use the "Create a New Attachment" link to attach the testcase to the bug report.
Comment 2•18 years ago
|
||
Somewhat simplified, using only <div>s (nothing is inline).
Comment 3•18 years ago
|
||
CCing dbaron, because this looks like a preferred-width issue, which might therefore be fixed in the reflow-refactor branch. Not confirming because this might be a duplicate.
Component: General → Layout: R & A Pos
Product: Firefox → Core
Version: unspecified → Trunk
Updated•18 years ago
|
QA Contact: general → layout.r-and-a-pos
Fixed by landing of bug 300030.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•