On 7/25/06, Magenta Placenta <[EMAIL PROTECTED]> wrote: > http://www.matthickerson.com/testing/ > http://www.matthickerson.com/testing/stylesheet.css > > I'm having problems getting all my main navigation elements to fit in a > specific div. > > Above url works in IE, but not in Firefox or Opera, the last 2 gray nav > items on the right are shifted down. I have:
Hi, Magenta Placenta, It looks like Firefox and Opera are interpreting the CSS float rules in the same way. The key is the height of the floated right navigation above those two boxes. Currently, the total height of the right-floated element is 62px height plus 12px padding, for a total of 74px. The rest of the top nav is 62px high in total. If you look at the specification,[1] rule #3 says that left-floating boxes can't overlap right-floating boxes. This means that the last two items in the main navigation cannot be in the same place as the other items in the navigation. Further down, rules 8 and 9 say that a floated box should go as high as possible in the document (as long as the other rules aren't broken about not overlapping, such as staying inside its container horizontally, etc.). So, between these three rules, Firefox and Opera see that the highest location where the floats can go is alongside the other elements, as long as they don't overlap the right-floated navigation above it. Probably the easiest way to fix this is to remove the height declaration from #masthead__righttextnav. HTH, Michael [1] http://www.w3.org/TR/CSS21/visuren.html#float-rules ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
