I'm trying to create a website layout using CSS grid and most content is manipulated as expected using align/justify-self but two or three areas aren't but I don't know why. They are 'Nav' and 'subhead'.
I don't know how to post this with less code and still have it demonstrate other areas of code that may be causing conflict or other reasons for it to not work. For some reason I have to post more information here before I am allowed to post this question so I am writing rubbish until it will allow me to post.
.gridcontainer {
display: grid;
grid-gap: 5px 0px;
grid-template-rows: 75px 75px 230px 750px 75px;
grid-template-columns: 230px 570px;
grid-template-areas: "banner subhead" "nav nav" "pic about" "left right" "footer footer";
width: 80%;
margin: 0px auto;
overflow: hidden;
}
.banner {
grid-area: banner;
justify-self: start;
align-self: center;
height: 100%;
width: 100%;
}
.subhead {
grid-area: subhead;
align-self: center;
justify-self: start;
font-size: 15px;
}
.nav {
grid-area: nav;
align-self: center;
background-color: #5c5858;
font-size: 15px;
height: 100%;
width: 100%;
}
a {
color: white;
padding: 0px 30px;
}
.pic {
grid-area: pic;
background-color: #e4d1d1;
}
<div class="gridcontainer">
<div class="banner">
<h1>Your Logo</h1>
</div>
<div class="subhead">
I can't get this to align.
</div>
<div class="pic">
Image of plane
</div>
<div class="nav">
I can't get this to align.
</div>
<div class="about">
<h1>About</h1>
</div>
</div>