I have a ul
which is has the elements laid out horizontally in a menu format. I want to make the li
's be vertically aligned in the space the ul
occupies, however I'm struggling to get it to work.
Does anyone have any ideas where I'm going wrong?
CSS
a {
color:#d82727;
text-decoration:none;
font-weight:normal;
}
a:link {
color:#d82727;
}
a:visited {
color:#d82727;
}
a:focus {
color:#d82727;
}
a:hover {
color:#d82727;
font-weight:bold;
}
#menu_bar {
background-color:#ffffff;
height:40px;
border-bottom:2px #eeeeee solid;
padding-left:20%;
padding-right:20%;
}
#menu_bar ul {
padding:0;
margin:0;
height:100%;
}
#menu_bar ul li {
display: inline;
height:100%;
vertical-align: middle;
padding-left:5px;
padding-right:5px;
}
#menu_bar ul li a:hover {
color:#d82727;
font-weight:bold;
}
.active {
color:#d82727;
border-bottom:2px #d82727 solid;
}
HTML
<div id="menu_bar">
<ul>
<li><a href="#/foo" class="active">Foo</a></li>
<li><a href="#/bar">Bar</a></li>
</ul>
</div>
And a fiddle of my current Code Here