- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have a navigation menu that is centering fine(The menu bar), but I would really like the links within the menu bar to be centered as well. I’ve tried everything I can think of. I’ve posted a working example at CodePen: http://codepen.io/anon/pen/GJQXKN I would really appreciate any pointers in the right direction.
Thanks so much!
Wraymus
You had some conflicting styles in there and some initial styles were overriden further down.
Paulie_D,
Thank you so very much! I’m curious: Was it one of the float:left styles?
Best regards,
Wraymus
There were a couple of things.
Centering with float
applied is pretty hard so inline-block
and text-align:center
works best here….at least for the top level list items…so, yeah, I removed that.
Also, the menubar itself wasn’t centered so I adjusted that too.
Thank you so much for taking the time to reply. I very much appreciate you.
Best regards,
Wraymus