why wont my top navigation and columns center?
http://min.us/mvoed0E
that's a link to my html and css file. i don't know why my margins aren't c开发者_StackOverflow社区entering things. also, i don't know why the text is expanding past the container.
you were trying to align the container even though it was in a different element
so first i added this to your nav
<li class="active">
<li><a class="floatr" href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Story</a></li>
<li><a href="#">Order</a></li>
</ul>
and got rid of the <div class="floatr"></div>
then i changed the css slightly
.lavalamp ul li a {
padding-left: 15px;
padding-right: 15px;
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
color: #fff;
font-size: 18px;
font-family: 'Merriweather', Helvetica, Arial, sans-serif;
}
.floatr {
top: 10px;
z-index: 50;
width: 80px;
height: 30px;
border-radius : 8px;
-moz-border-radius : 8px;
-webkit-border-radius : 8px;
background : rgba(0,0,0,.20);
-web
kit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
}
精彩评论