Deadweight
04-13-2017, 03:29 AM
So either I'm braindead, not thinking, or just plain stupid (maybe all three)
I currently have two simple html elements
<div id="mainWrapper">
<div id="content">
x
</div>
</div>
My css currently contain:
* {
margin: 0px auto; padding: 0px;
font: 14px/28px Arial, sans-serif;
}
li {list-style: none;}
body { background: #F5F4ED; }
html, body { height: 100%; }
I am wanting the first #mainWrapper to be 100% on the head/body which I know is height: 100%;
However, the issue is I also want the #content to be 40px lower while being the reminder of the space (at least). EG height: calc(100% - 40px); while the mainWrapper still being at the top of the page.
If there is more content in the #content section then it would auto-fit to the end else, like before, 100% - 40px
Any ideas?
I currently have two simple html elements
<div id="mainWrapper">
<div id="content">
x
</div>
</div>
My css currently contain:
* {
margin: 0px auto; padding: 0px;
font: 14px/28px Arial, sans-serif;
}
li {list-style: none;}
body { background: #F5F4ED; }
html, body { height: 100%; }
I am wanting the first #mainWrapper to be 100% on the head/body which I know is height: 100%;
However, the issue is I also want the #content to be 40px lower while being the reminder of the space (at least). EG height: calc(100% - 40px); while the mainWrapper still being at the top of the page.
If there is more content in the #content section then it would auto-fit to the end else, like before, 100% - 40px
Any ideas?