css flex both take 100% height code example Example: flexbox stretch height .flex-2 { display: flex; align-items: stretch; }