The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Apply same height of Parent and Child (CSS4Dummies)

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #261277

    Hi, I’m facing a problem and I kindly request for help.
    It’s presumably a very basic problem; I just want the div.content to have the same height as the div.container (in this case “min-height: 100vh”).

    Could someone please have a look?


    Google is your friend – search this phrase “flex child fill remaining height” and the answer comes up many times in the first page.

    And here’s the CSS Tricks guide on flexbox for you to read up on
    Hint: the “children” section and “flex-grow” will be most useful to you.


    Yes, that is correct. To be quick, your div.content is a flex item, but it doesn’t grow automatically because default is not to grow. So just put for example flex-grow: 1 in your style for div.content and it will grow.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design’ is closed to new topics and replies.