I have an outerWrapper
, innerWrapper
, and children.
outerWrapper
has a height of 300px
, and is display: flex
.
innerWrapper
is also display: flex
.
I think because they are flex
, innerWrapper
inherits outerWrappers
height.
I want to add align-content: flex-end
to outerWrapper
. But it doesn't work, because innerWrapper
inherits outerWrappers
height.
How can I add align-content: flex-end
to outerWrapper
?
Or, how can I keep innerContents
height the same height as its children, so align-content: flex-end
will work?
Here's an image describing what I want:
I want to bring innerContent
down to the red line.
Update
I just want to clarify. I want innerWrapper
to end at the red line, not start.
#outerWrapper {
height: 300px;
background-color: lightgreen;
display: flex;
flex-wrap: wrap;
align-content: flex-end;
}
ul {
padding: 0;
margin: 0;
display: flex;
align-items: center;
flex-wrap: wrap;
}
li {
list-style-type: none;
width: 100px;
height: 100px;
background-color: lightblue;
border: 1px solid;
}
<div id="outerWrapper">
<ul id="innerWrapper">
<li class="child">I'm #01</li>
<li class="child">I'm #02</li>
<li class="child">I'm #03</li>
<li class="child">I'm #04</li>
<li class="child">I'm #05</li>
</ul>
</div>