We help IT Professionals succeed at work.

How to remove extra space in IE8

Break40
Break40 asked
on
There is extra space above the Areas of Practice link. You can see the site at the link below:

http://domgarofalo.com/menu

It looks fine in ff, chrome, and safari. I have tried negative padding and margin to no avail.
Comment
Watch Question

LZ1
Top Expert 2011

Commented:
Try starting with a CSS reset.
http://meyerweb.com/eric/tools/css/reset/
Top Expert 2011
Commented:
Actually you have an invalid Doctype!

Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The doc type is perfectly fine the way it is, it's called a historical doc type.

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Back to the original question, you should always reset your CSS with:

* { margin: 0px; padding: 0px; }

Then code for FireFox (it has no easy hacks), add any necessary Safari hacks (shouldn't need any), then create conditional stylesheets for IE 6, 7, 8, 9, and 10.  That will allow you to fix minor issues in the IEs that may be different in each IE and it won't affect your other browsers.

Author

Commented:
That did it. Thank you!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.