Home > other >  Can't set full height for flexbox child , any help would be appretiated HTML CSS SASS Web Desig
Can't set full height for flexbox child , any help would be appretiated HTML CSS SASS Web Desig

Time:06-05

I'm trying to create a movies app with similar layout to that of youtube, I used the body as a flex parent and (nav and main) as flex children, I already went through some similar questions in Stackoverflow however none of them solved my problem

an image of the result enter image description here

here's my code :

```https://codepen.io/userahmad2001/pen/poaKXBz```

CodePudding user response:

I believe I understand what you're saying,

(If this is completely wrong let me know an I'll update it!)

you need to add a height to the body, perhaps a min-height would help

body {
  min-height: 100vh; 
}

this sets the height to be ATLEAST the the height of the viewport.

Take a look, https://codepen.io/looskie-the-flexboxer/pen/abqjOge

  • Related