Borja Borja - 1 year ago 80
HTML Question

Centering links within navigation menu

I'm buidling my site and I'm trying to horizontal centering the following code with no luck:

If I'm not wrong I must add a css code for

nav ul
so I added the following code but it's not working:

nav ul li {

Can someone please tell me how can I center the menu so I can have the following output? Thanks in advance.
enter image description here

Answer Source
  1. Remove the float: left property from nav ul li and nav li
  2. Change display:block to display: inline-block for li
  3. Add the following to your css:

#nav ul {


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download