ورود

View Full Version : وسط قرار دادن منو



symoon
یک شنبه 20 اردیبهشت 1394, 19:39 عصر
سلام
من میخوام منو وسط قرار بدم ولی text-align هرجا میزارم عمل نمیکنه ممنون میشم راهنمایی کنید

<div id="top-heder">
<div id="centerdiv">
<ul id="txt-top-heder">
<li><a class="txt-top-hedert" href="#">صفحه نخست</a></li>
<li><a class="txt-top-hedert" href="#">صفحه نخست</a></li>
<li><a class="txt-top-hedert" href="#">صفحه نخست</a></li>
<li><a class="txt-top-hedert" href="#">صفحه نخست</a></li>
</ul>
</div>
</div>

#top-heder{
background-image: url(web/images/meno.jpg); repeat-x;
width: 100%;
height: 44px;
margin: auto;
box-shadow: 0 2px 5px #000000;
-moz-box-shadow: 0 2px 5px #000000;
-webkit-box-shadow: 0 2px 5px #000000;
}
.txt-top-hedert{
text-decoration: none;
color: #fff;
font-family:Yekan;
padding: 12px 20px;
text-align: center;

}
.txt-top-hedert:hover{
background-color: #6a737d;
padding: 12px 20px;
}
#txt-top-heder li{
list-style-type: none;
padding: 15px;
color: #fff;
margin-right: 0px;
float: right;
text-align: center;
}
#txt-top-heder ul{
text-align: center;
}

Omid Jackson
یک شنبه 20 اردیبهشت 1394, 20:37 عصر
به txt-top-heder# باید width بدین و margin: auto