How do I manually leave empty space at the bottom of a html page?
My contents are in div
and are positioned:absolutely
mostly.
I tried couple of <br>
s right before </body>
. Did not work. I tried margin-bottom:2cm;
on the div. Did not work.
absolute positioned div's are out of the document flow, so whatever you do, won't affect the other elements on the page and hence, margin-bottom
fails as well, so what you can do is use a wrapping div
with a height of 100%;
and than use margin-bottom: 2cm;
and it will work
html, body {
height: 100%;
background: #f50;
}
div { /* Using element selector, you can use ids or classes instead to be specfic*/
height: 100%;
margin-bottom: 2cm;
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments