I've been trying to figure out why there's a thin (maybe 1px) line at the bottom of my layout and finally pinpointed the body {line-height: 1;}
in Eric Meyer's reset file. For some reason, this setting is causing the html element to extend just past my footer.
I tried this out on a super simple page with just a main div with a background color of gray, setting the html background to red so I can see the line at the bottom of the window. Playing around with height settings on the main div, p tag, or an img, the line only disappears when the main div has a height setting. (I tried to use that information to fix my actual project, but it doesn't seem to work there...)
I made a simple jsfiddle if you want to see what I'm talking about - http://jsfiddle.net/DFDj8/ - changing the #main img {height: 800px;}
to just #main {height: 800px;}
gets rid of the red line at the bottom. Commenting out the line-height
setting in the reset does the same.
Any thoughts on what's happening? If there's another post that explains this, feel free to link to it - I couldn't find anything similar.
Thanks!
*Updated jsfiddle with block-level footer as last element - http://jsfiddle.net/DFDj8/6/
The code in jsfiddle contains Eric Meyer's reset plus the following:
html, body {
background: red;}
#main {
background: gray;}
#main img {
height: 800px;
display: block;}
<body>
<div id="main">
<p>paragraph paragraph</p>
<img src="http://auntdracula.com/wp-content/uploads/2013/05/Delicious_Steaz_Soda.jpg" />
</div>
<footer>
<p>© 2013</p>
</footer>
</body>