Hello.
This is probably a stupid question, but never the less, Im stuck.
I´m trying to make a homepage wjth a header, hero and a footer. The header and footer have a fixed heigth and I would like the hero to take up the rest of the space.
I put them all in a container with a vh of 100.
The header and footer are OK but the hero just shrinks to the size of the font. I would like the hero to push the footer all the way down so it sits at the bottom of the view port.
Here´s the html
And here´s the css
Hope you can help me.
Sincerely
Ronny
This is probably a stupid question, but never the less, Im stuck.
I´m trying to make a homepage wjth a header, hero and a footer. The header and footer have a fixed heigth and I would like the hero to take up the rest of the space.
I put them all in a container with a vh of 100.
The header and footer are OK but the hero just shrinks to the size of the font. I would like the hero to push the footer all the way down so it sits at the bottom of the view port.
Here´s the html
HTML:
<body>
<container>
<div class="header"><h3>This is the header</h3></div>
<div class="hero"><h3>This is the hero</h3></div>
<div class="footer"><h3>This is the footer</h3></div>
</container>
</body>
</html>
And here´s the css
CSS:
.container{
hight: 100vh;
}
.header{
background-color: #005BFC;
height: 35px;
}
.hero{
background-color: #FB4C4F;
height: 100%;
}
.footer{
background-color: #63F97E;
height: 250px;
}
Hope you can help me.
Sincerely
Ronny