For some reason the align-items
property is not working properly.
Justify-content
is working fine, and I'm trying to figure out why align-items
is not working, because the height of the .right
container class is just as high as the parent div, or so it should be.
I'm trying to apply space-between
but my two elements are not spreading.
And actually it seems as though height is set to auto
for all the columns even though I put 100% for height so I'm not sure what's going on.
I've set auto
for the innermost children, but not for the immediate children of .container
.
html,
body {
height: 100%;
}
#bigwrap {
position: relative;
}
.left,
.middle,
.right {
border-right: 1px solid blue;
}
.left {
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: space-around;
order: 1;
flex: 1 20%;
height: 100%;
}
.left img {
max-width: 100%;
}
.middle {
display: flex;
flex-flow: column wrap;
order: 2;
flex: 2 20%;
height: 100%;
}
.right {
display: flex;
position: relative;
flex-flow: row wrap;
align-items: space-between;
justify-content: center;
order: 3;
flex: 1 50%;
height: 100%;
}
div.list {
display: flex;
flex-flow: row wrap;
width: 70%;
justify-content: center;
line-height: 300%;
;
border: 1px solid pink;
}
.right .list {
// text-align: center;
height: auto;
}
.list ul {
list-style: none;
padding: 0;
}
.list a {
text-decoration: none;
color: inherit;
}
.headbox h3 {
color: orange;
}
.container {
display: flex;
//position: absolute;
position: relative;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
min-height: 70vh;
width: 70%;
margin: 5% auto 8% auto;
background-color: white;
}
.container p {
margin-bottom: 12%;
}
.container img {
margin-bottom: 10%;
}
.container img:first-child {
margin-top: 5%;
}
.middle p:first-child {
margin-top: 8%;
}
.left,
.middle,
.right {
border-right: 1px solid blue;
}
.left {
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: space-around;
order: 1;
flex: 1 20%;
height: 100%;
}
.left img {
max-width: 100%;
}
.middle {
display: flex;
flex-flow: column wrap;
order: 2;
flex: 2 20%;
height: 100%;
}
.right .list {
height: auto;
}
.list ul {
list-style: none;
padding: 0;
}
.list a {
text-decoration: none;
color: inherit;
}
.headbox h3 {
color: orange;
}
.right .headbox {
border: 1px solid orange;
width: 70%;
height: auto;
display: flex;
justify-content: center;
align-items: center;
}
<div id="bigwrap">
<div class="container">
<div class="left">
<img src="cat1.jpeg" alt="Picture of kid">
<img src="cat1.jpeg" alt="Picture of kid">
</div>
<div class="middle">
<div class="box">
<p>
Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.
</p>
</div>
<div class="box">
<p>
Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.
</p>
</div>
<div class="box">
<p>
Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.
</p>
</div>
</div>
<div class="right">
<div class="headbox">
<h3>Visit Us</h3>
</div>
<div class="list">
<ul>
<li><a href="#">Home</a>
</li>
<li><a href="#">Hours</a>
</li>
<li><a href="#">Plan</a>
</li>
<li><a href="#">Directions</a>
</li>
</ul>
</div>
</div>
</div>
</div>