CSS Property:
align-items:

Result:
RED
BLUE
Green div with more content.
CSS Code:
div#main {
  display:flex;    
  align-items:stretch;
}
Click the property values above to see the result
W3Schools.com - Play it