Click to See Complete Forum and Search --> : IE Margin Error
aklah
08-06-2006, 07:00 AM
I used to wonder what all the fuss was about when people complained about IE. But now I have started doing a liitle bit of web development now I know
I know there is a common problem with IE doubling the margin sometimes. I am away from home and unfortunately I don't have the literature with me that would assist me with sorting this issue.
Could somebody please tell me what the fix is again as my memory fails me.
kind Regards
NogDog
08-06-2006, 07:14 AM
Fix number 1: make sure you begin your document with a doctype declaration (http://www.w3.org/TR/html4/struct/global.html#h-7.2) (see this list of recommended doctypes (http://www.w3.org/QA/2002/04/valid-dtd-list.html)) so that IE is not in "quirks mode".
give your object display:inline
http://www.positioniseverything.net/explorer/doubled-margin.html
That is somehow related with another welknown IE bug, if nesting a block element inside a form (a table for instance) an unwanted margin appears at the bottom of the table. The solve is the same. IE considers (only God and Gates know why) the form element as a block element. Give the form a display:inline will repair the bug.
pacerier
08-06-2006, 08:15 AM
I know there is a common problem with IE doubling the margin sometimes. I am away from home and unfortunately I don't have the literature with me that would assist me with sorting this issue.
Could somebody please tell me what the fix is again as my memory fails me.
kind Regards
its best if you would elaborate on the problem. like doubling the margin sounds weird? perhaps you may try style="margin:0px;" or it may be caused by other elements in the page. if possible please post the link of the page or the code for it when you get home
WebJoel
08-06-2006, 12:10 PM
There are other issues with IE borders, padding etc., but the number-1 most problematic thing I keep coming across, is IE's infernal adding additional pixels to padding, margin and border.
Add:
<style type="text/css">
body, html {margin:0; padding:0; border:0;} /* Re-sets IE to "zero" for these values */
</style>
to every page you write, to re-set IE to "zero" for these. Allother browsers do this be default, and this won't affect them in any way.
-J
aklah
08-08-2006, 03:56 PM
Thankyou for all your input. it was much appreciated and all of your points have been noted for the future.
The Display:Inline fix was the one that cured the issue.
Once again thankyou for your input.
Kind regards