I struggle to understand how these things work and I would greatly appreciate it if someone could provide an explanation.
1 http://d.pr/i/6TgE+
why http://d.pr/i/UAZn+
*it's actually 9.
Here is the code snippet:
<header>
<div class="container">
<div class="grid">
<div class="grid__item one-half">
<a href="index.html" class="logo-site">
<img src="http://aurelieremia.be/img/logo-aurelie.svg" alt="logo-ar">
</a>
</div><!--
--><div class="grid__item one-half">
<nav>
<ul class="nav main-nav">
<li>
<a href="#" class='active'>work</a>
<a href="#">about</a>
<a href="#">process</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</header>
and here is the accompanying CSS :
.container {
max-width: 1140px;
height: 40px;
margin: 0 auto; }
header {
background: #4f4348;
height: 40px;
position: relative; }
.logo-site {
height: 82%;
background: #938b88;
display: inline-block; }
.logo-site img {
height: 28px;
vertical-align: middle;
display: inline-block;
line-height: 40px; }
.main-nav a {
font-size: 14px;
text-transform: uppercase;
color: #f5f3e2;
line-height: 40px;
margin-right: 10px;
font-family: "Brandon Grotesque Medium"; }
.main-nav a.active, .main-nav a:hover {
background: #f5f3e2;
color: #4f4348; }
If you are unfamiliar with inuit.css, here is a portion of the code used from this framework:
.grid{
margin-left:-$base-spacing-unit;
list-style:none;
margin-bottom:0;
}
.grid__item{
display:inline-block;
width:100%;
padding-left:$base-spacing-unit;
vertical-align:top;
@if $global-border-box == false{
@include vendor(box-sizing, border-box);
}
one-half { width:50%; }
The first grid__item does not take up the full height from its parent containers. Setting height properties did not work, so I had to enlarge my logo to make it function properly.
The second grid__item works but only because I added a line-height property to center it vertically. However, I want to add a border for the active state which is proving difficult due to the links taking up all the available height space. The challenge lies in centering the content.
What I am aiming for:
dream http://d.pr/i/6Ggm+
Please help me solve this problem.