Pregunta

I'm using the Skeleton theme to create a responsive wordpress site. I'm attempting to center the top navigation but to no avail.

Here is the link: http://bit.ly/13e2tIX

This is what I'm trying:

#navigation ul li {
position: relative;
display: inline-block !important;
text-align:center;
width: 100%;
color:#666;
text-transform: uppercase;

}

But this will center and stack all of the navigational items. Any help would be greatly appreciated.

¿Fue útil?

Solución

Try this:

#navigation ul {
    text-align:center;
}
#navigation ul li {
display:inline;
list-style:none;
position: relative;
color:#666;
text-transform: uppercase;
}
#navigation ul li a {
    display:inline-block;
}

You can see the jsfiddle here: http://jsfiddle.net/sb4NH/

Otros consejos

This answer didn't work for me, but this did:

.menu-header
{
   display:inline-block;
}

#navigation
{
   margin:0 auto;
   text-align:center;
}

Only tested in chrome inspector, but it seems to center the navigation menu of skeleton theme for wp.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top