I have a simple horizontal menu with two levels. This menu stretches to 100% width of the wrapper. Here is the fiddle: http://jsfiddle.net/gpsgv/
If you run this fiddle in any browser except Firefox, it displays the following, as expected:
If you run this fiddle in Firefox, it displays the following:
Looking at the code, the second level lists are absolutely positioned inside the first level items (which have display: relative
style). So, setting the left: 10px
style to second level list should position it 10px from the left side of its relatively positioned ancestor. Similarly for top: 30px
. But in Firefox, instead, it positions it on the left side and at the top of I don't know what, maybe the body?
My question is, is there any solution to make it display correctly in Firefox, without changing the HTML?
P.S. I use display: table-cell
because the menu must be spread evenly along 100% container width.