sebnitu / HorizontalNav

A jQuery plugin that spans a horizontal navigation to fit the full width of it's container.
MIT License
277 stars 43 forks source link

Doesn't Play Nice With Superfish Dropdown in FireFox #5

Closed LiamW closed 11 years ago

LiamW commented 12 years ago

I haven't tested with any other dropdown plugin, but with Superfish in FireFox for Mac, the dropdowns are aligned far left no matter what top menu you hover over, making the menu unusable as you can't hover down to the sub menu.

sebnitu commented 12 years ago

Do you have this up somewhere so I can see the styles you have applied? I haven't looked at the superfish plugin yet but if it positions it's dropdowns absolutely, you may need to add position: relative to the root <li> items.

sebnitu commented 12 years ago

Ok, I see what's going on. FF seems to have a bug when displaying absolutely positioned elements with a parent that has display: table-cell applied to it. One work around would be to set tableDisplay: false to your horizontalNav call. This will just force the plugin to manually set the widths of the parent list items instead of using the display: table method.

$('#your_selector').horizontalNav({
    tableDisplay : false
});

Let me know if that works for you. I'll be looking for a CSS solution to get the display table method to work with drop-downs in the mean time.

LiamW commented 12 years ago

Yup that does the job.

The alignment isn't as nice, as I'm seeing some padding (lack thereof) issues when doing it this way, but I'll tinker with this myself. The biggest issue was the FF dropdowns.

Thanks for the super fast response and solution.

Cheers,

sebnitu commented 12 years ago

Throw a #mainNav > ul > li { text-align: center; } in there and that should fix your padding issue :)

Glad I could help!