I have two modules:
A .master-header
and a .header-nav
The .header-nav
is inside the .master-header
and is a simple nav:
<nav class="header-nav">
<ul>
<li class="active">
<a href="/home">Home</a>
</li>
<li class="">
<a href="/here">Item</a>
</li>
<li class="">
<a href="/photos">Photos</a>
</li>
<li class="">
<a href="/here">Item</a>
</li>
</ul>
</nav>
In my .header-nav
module I have the height
of the a
, li
and ul
to be 100% and then set the height
of the .header-nav
to be 100px
from within the .master-header
as that's logically correct as to where the layout styles for it's children should belong.
Now, the problem comes as I wish to vertically center the text within the a
's. Line height is perfect for this but 100% won't work as 100% is the height of the font. line-height: 100px
is the perfect thing to use to solve the issue but putting that inside the .header-nav
module seems wrong as that's indicating that ALL .header-nav
's should be like that. I'd much rather it say something like 50% but I can't do padding-top: 50%
as that's based on the width of the item.
Any thoughts on what to do?
Neil