Hi all,
I’m trying to figure out how to get the a href’s to be central (horizontal as well as VERTICAL), in a nav box. (The reason I’m trying to do this is so that I can have a banner that is the only the height of my nav rather than the entire footer or any other elements).
I’ve attached a picture to show what I mean:
I can center the text horizontally but can’t get it to move vertically into the center of the nav box. I currently have the following code:
nav {
background: lightblue;
height: 120px;
text-align: center;
}
and I have tried putting margin-top into the nav a:
nav a {
margin-top: 10px;
}
But this has no effect on the text.
I then tried putting the nav a text into a div:
and then use the css:
nav div {
margin-top: 45px;
}
and this worked better, but this doesn’t get it perfectly center.
Any thoughts or suggestions would be MUCH appreciated! =)
Many Thanks,
Matt