Flexbox: Equal div height inside a li element?

The name of the picture


Flexbox: Equal div height inside a li element?



I have some div elements inside a li element. I need to equal the height of some of those divs (not all of them).


div


li



Example code:



I need to have the same height for the div.equal


div.equal




#parent {
display: flex;
}

.equal {
flex: 1 0 auto;
}


<ul>
<li id="parent">
<div class="equal">
some content here...
</div>
<div class="not-equal">
some content here...
</div>
<div class="equal">
some content here...
</div>
</li>
</ul>




1 Answer
1


.not-equal {
align-self: flex-start;
}



However, it took me less then 5 minutes to find the answer (and I didn't know it either). Google it a bit before you post on Stack Overflow.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

How to scale/resize CVPixelBufferRef in objective C, iOS