Reputation: 362
I have built this menu:
JSBIN EDIT ; JSBIN DEMO
As you see, the menu isn't centered at the middle of the bar, he's centered up. However, I want to make it go lower, exactly at the middle.
So, I had an idea to do margin-top: 26px
because the bar's height is 53 pixels, but it doesn't change anything. I also did margin: 0 auto
and text-align:center
.
I read this STACKOVERFLOW and realized that it is related in float, but I don't want to float it - I want to make it go down.
Thank you!
Upvotes: 0
Views: 62
Reputation: 3537
Try setting the line-height
of the links to the height of the bar, in this example 53 pixels.
Upvotes: 0
Reputation: 167250
You need to give the line height by using Okay, updated, the line-height
.line-height
trick doesn't work!!! And also, giving this to the <a>
tag does the trick:
width: auto;
display: inline-block;
Upvotes: 4