Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to equally divide the width of menu? Reply To: How to equally divide the width of menu?

#171317
nixnerd
Participant

Oh…and flexbox.

I don’t yet know that flexbox is ready for primetime. I’d give it another year before you go ahead and do that.

At any rate, if you KNOW the number of li entries in the ul… you don’t even need JS. That’s probably a more “break-free” method though because you can add a menu item at any time without breaking the layout… to a point. I mean, you can’t have 99 across the nav and expect nothing bad to happen.

Also, there’s probably some super exotic SASS mixin out there with some really clever for loop that can do this. But, it’s really quite easy to hard code the values in.