This line in reset.css adds 1-2 pixels of white space at the bottom of the <body> element:
body {
line-height: 1;
}
Removing line-height: 1; fixes the problem. I've attached before/after shots to illustrate.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | reset_pixel_error_no_clearfix.png | 10.75 KB | todd nienkerk |
| reset_pixel_error_after.png | 12.11 KB | todd nienkerk | |
| reset_pixel_error_before.png | 11.32 KB | todd nienkerk |
Comments
Comment #1
todd nienkerk commentedAlso, this can't be overridden in another CSS file. The line has to be removed from reset.css completely in order to close the gap.
Comment #2
Christopher Herberte commentedCould we do without the reset.css? It causes many headaches and I keep wondering is it really necessary?
Comment #3
dvessel commentedI suspect it's due to the clearfix class + the line height. But yeah, this should be rethought so nothing seems forced. For now, just add this into your sub-theme's .info file to remove it.
Without the file in your sub-theme, it'll be omitted.
Comment #4
Christopher Herberte commentedYep, this is the first thing I do when creating a new sub-theme or theme base on 960. Maybe this is for a new topic but it would be nice to see a "show of hands", for and against the use of reset.css (period) -- A "nay" from me :P
Comment #5
todd nienkerk commentedI like reset.css, so I just commented out that one line.
@dvessel re: #3: I tested this without the clearfix method and still found an additional pixel at the bottom of the page. (I only tested this in Firefox, though.) See attached screenshot.
Comment #6
todd nienkerk commentedAdded warning to reset.css in 6.x-1.x-dev and 7.x-1.x-dev.
Comment #7
dvessel commentedNot sure this will still show after syncing with the latest 960.gs source since it uses another clearfix method. That body line-height was overwritten as well.
I think I'll also make it an option to include the reset file. I have some code in place to allow it to be configured from a subtheme. Just need to hook it in.
Comment #8
michaelfillier commentedI am not sure what is causing my problem, but I noticed that my ninesixty sub-themes have a space (larger than 1-2px) on the bottom that I cannot figure out! See: http://maiaandassociates.ca
I am having the same problem on a development site and I cannot get it to go away. Any help would be tremendously appreciated.
Comment #9
dvessel commented@michaelfillier Look at #footer-sub and the .clear-block you added to that. Remove it. It's not related to the reset.css from the theme. It's a combination of Drupal core's .clear-block and the line-height you added to the body.