I can't seem to figure out why I'm struggling with this. Check out the screenshot below:
Here is my current CSS:
#tabbase {
display : inline-block;
width : 230px;
height : 173px;
border : 1px solid #3e3e3e;
background-color : #1b1b1b;
box-shadow : 0px 0px 4px 2px rgba(0, 0, 0, 0.4) inset;
margin-top : 6px;
}
#tabbase a {
display: block;
height: 43px;
text-decoration: none;
font-family: 'Nexa Bold';
font-size: 24px;
}
#tabbase a p {
text-align: center;
}
Now, let's take a look at the HTML:
<div id="tabbase">
<a id="blog" href="#"> <p> Blog </p> </a>
<a class="batl" href="#"> <p> Home </p> </a>
<a class="batl" href="#"> <p> Contact </p> </a>
<a class="batl" href="#"> <p> Samples </p> </a>
</div>
I have tried using margin, padding, border, vertical-align, and even text-align in my CSS code, but nothing seems to work.
What could be the issue?
p.s: In case it helps, here is the background image style for the <a id="blog">
tag:
#tabbase #blog {
color: #000000;
background-image: url('Tab.png');
}
When I use span instead, I get this result:
Adding text-align:center;
to the anchor tag gives me this output: