I have looked at various other questions on this & haven't been able to find an answer that works for this example.
I'm trying to center the 'about' text to the right (both vertically and horizontally) within its 10% container. As well as the logo being centered within the whole 100% of the header.
HTML
<header>
<div class="headerContainer">
<div class="logo">
<img src="images/App Header.png"/>
</div>
<div class="aboutHeader">
<a href="aboutPage.html"><p>About</p></a>
</div>
</div>
</header>
CSS
header{
display: inline;
}
.headerContainer{
border-bottom: /* was #979797 or #575757 */ rgba(0,0,0,0.8) 2px solid;
height: 5rem;
width: 100%;
display: flex;
flex-wrap: wrap;
background-color: #e5e5e5;
background-size: cover;
margin: 0;
padding: 0;
position: fixed;
top: 0;
overflow: hidden;
text-align: center;
}
.logo{
width: 80%;
margin-left: 10%;
}
.aboutHeader{
width: 10%;
float: right;
}
.aboutHeader p{
color: #000;
}
.aboutHeader p:hover{
color: #3bb7bd;
}
.aboutHeader a{
color: #000;
font-style: none;
text-decoration: none;
}
tag along with the accompanying CSS & added a height and line-height of 5rem to .aboutHeader. I also changed the .aboutHeader p:hover to .aboutHeader a:hover to keep the hover effect.
– Tucky May 23 '17 at 09:12