I need to have the body of all my webpages (except homepage) located on http://www.zorglegal.nl to the same height (100% browser height), so the brown bar on the right is stretched full screen from top to bottom. How can I best achieve this?
html{
height: 100%;
}
body{
min-height: 100%;
}
doesn't work. I also tried to set a class for the content element and tried to set it to 100% height but that doesn't work either. How can i do this?
The brown bar is a png image and is set as a background image for a fullwidth container. So if that container is 100% high, it should work. But how?
For a responsive full page height, set the body element min-height to 100vh.
height: 100% gives the element 100% height of its parent container. height: auto means the element height will depend upon the height of its children.
For example, height: 100%; applied to an element is relative to the size of its parent. In contrast, height: 100vh will be 100% of the viewport height regardless of where the element resides in the DOM.
width: 100%; will make the element as wide as the parent container. Extra spacing will be added to the element's size without regards to the parent.
You can use viewport height.
height: 100vh
This means that the div or whatever is as high as the browser window.
html, body{
margin: 0;
padding: 0;
min-width: 100%;
width: 100%;
max-width: 100%;
min-height: 100%;
height: 100%;
max-height: 100%;
}
This Css will help you to set height 100% for every page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With