Witam,
tak jak w temacie - chciałbym wyśrodkować top menu w szablonie WordPress, jednak dopiero zaczynam pracować z tą materią i nijak nie mogę sobie z tym poradzić. Poniżej przedstawiam kod css.
/* Top Menu */
#main-nav ul {
background-color: #0c7dc9;
display: inline-block;
font-size: 12px;
font-weight: bold;
margin: 0 0 20px;
position: relative;
line-height: 1.8;
width: 100%;
z-index: 300;
}
#main-nav ul ul {
display: inline-block;
left: 0;
position: absolute;
top: 36px;
width: 130px;
}
#main-nav ul ul ul {
left: 140px;
top: auto;
}
#main-nav ul li {
display: inline;
float: left;
line-height: 3;
position: relative;
}
#main-nav > ul > li,
#main-nav .menu > ul > li {
border-right: solid 1px #fff;
}
#main-nav ul li li {
line-height: 2.4;
}
#main-nav ul a {
color: #fff;
display: block;
padding: 0 15px 0;
text-shadow: #264c6c 1px 1px 0;
}
#main-nav ul a:hover,
#main-nav .menu-item:hover,
#main-nav .page_item:hover,
#main-nav .current-menu-item > a,
#main-nav .current-menu-ancestor > a,
#main-nav .current_page_item > a,
#main-nav .current_page_ancestor > a {
color: #fff;
background-color: #ff0000;
}
#main-nav ul ul a {
background-color: #444;
border: 1px solid #333;
border-bottom-color: #555;
display: block;
float: left;
text-shadow: none;
width: 130px;
}
#main-nav li:hover ul ul,
#main-nav li:hover ul ul ul,
#main-nav li:hover ul ul ul ul {
display: none;
}
#main-nav li:hover ul,
#main-nav li li:hover ul,
#main-nav li li li:hover ul,
#main-nav li li li li:hover ul {
display: block;
}
#search {
float: right;
margin-top: 5px;
}
#social {
clear: right;
float: right;
display: inline;
margin-top: 15px;
}
#social ul {
margin: 0;
}
#social li {
display: inline;
}
#social li a {
background: url("images/social-icon-sprite.png") no-repeat top left;
display: inline-block;
height: 20px;
text-indent: -999em;
width: 20px;
}
#social .facebook {
background-position: 0 0;
}
#social .flickr {
background-position: 0 -25px;
}
#social .linkedin {
background-position: 0 -50px;
}
#social .twitter {
background-position: 0 -75px;
}
#social .youtube {
background-position: 0 -100px;
}