I'm struggling with centering the text within the li tags in my tabbed navigation bar. I don't want to add padding to the top of the text because I want the entire tab to be clickable. Any advice on how to achieve this? Also, how can I make the link text centered and the whole tab clickable?
<div id="tab_container">
<nav id="tabs">
<ul id="nav">
<li class="active"><a href="#">About</a></li>
<li class="inactive"><a href="#">Services</a></li>
<li class="inactive"><a href="#">Our Staff</a></li>
<li class="inactive"><a href="#">book</a></li>
<li class="inactive"><a href="#">Gift Cards</a></li>
<li class="inactive"><a href="#">Reviews</a></li>
</ul>
</nav>
</div>
Can you please review my CSS for any mistakes?
#tab_container
{
background-color: #222;
display: -webkit-box;
-webkit-box-flex: 1;
display: block;
position: relative;
max-width: 970px;
width: 100%;
text-align: center;
}
#tabs
{
float: left;
margin-top: 0px;
width: 100%;
max-width: 970px;
background-color: #222;
padding-top: 20px;
text-align: center;
}
#nav
{
width: 100%;
max-width: 970px;
text-align: center;
}
ul
{
float: left;
max-width: 970px;
display: -webkit-box;
-webkit-box-flex: 1;
width: 100%;
padding-left: 0px;
margin-bottom: 0px;
margin-top: 0px;
margin-right: 0px;
text-align: center;
}
ul li
{
display: inline-block;
text-align: center;
width: 158px;
height: 70px;
background-color: black;
font-size: 18px;
text-transform: uppercase;
text-align: center;
margin:0 auto;
padding: 0;
}
ul li a
{
color: #54544b;
text-decoration: none;
text-align: center;
margin: 0px auto;
}
a:hover
{
color: #CF7BA1;
}
.active a
{
text-decoration: underline;
color: #CF7BA1;
}