I'm trying to create a website that has a 'panel div on the left, and 'content' div on the right, both contained within <body>
, and I want them to dynamically expand height to the size of the window. The problem is, when I use html,body{height:100%}
, there is a scroll bar appearing. I'm hesitant to post full code of what I'm doing, but it is doing this still with a stripped down to:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<STYLE>
html, body {height:100%}
</STYLE>
<BODY>
</BODY>
</HTML>
so I don't think anything I'm doing could be messing with it...
I will try to provide more info upon request.
HTML/BODY got standard padding/margin going on
try:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<STYLE>
html, body {height:100%;
margin:0;
padding:0;}
</STYLE>
</HEAD>
<BODY>
</BODY>
</HTML>
<body>
has 8 pixels of margin around it by default, which falls outside the 100%
height.
You need to remove that.
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