Reputation: 701
I would like to centered the ul-list inside the div-container. My Code:
<div class="subnav_wines">
<ul>
<li><a href="?sel_regio=4">ToBeDefined</a>
</li>
<li><a href="?sel_regio=2">Valpollicella</a>
</li>
<li><a href="?sel_regio=1">Veneto</a>
</li>
<li id="dd_sort" class="last"><a id="" href="#">Sorted by</a>
</li>
</ul>
<div style="clear:both"></div>
</div>
And the CSS:
.subnav_wines {
border-bottom: 1px solid #b58150;
padding: 0;
margin-bottom: 0px;
}
.subnav_wines ul {
padding: 0;
margin: 0;
text-align: center;
}
.subnav_wines li {
float:left;
padding: 10px 25px 10px 25px;
margin: 0;
}
.subnav_wines li.last {
border-right: 0;
padding: 0;
}
.subnav_wines li a {
text-transform: uppercase;
color: #b58150;
text-decoration: none;
}
.subnav_wines li a:hover {
border-bottom: 1px solid #b58150;
}
.subnav_wines li a.active {
border-bottom: 1px solid #b58150;
}
Can anyone help me?
Thanks.
Upvotes: 0
Views: 53
Reputation: 216
hi try the below code for ul
.subnav_wines { border-bottom: 1px solid #b58150; padding: 0; margin-bottom: 0px; text-align:center}
.subnav_wines ul { padding: 0; display:inline-block; }
working example : http://jsfiddle.net/zQTD3/
Upvotes: 0
Reputation: 21666
Add the below to your CSS
.subnav_wines {
text-align: center;
}
.subnav_wines ul {
display: inline-block;
}
Upvotes: 0