/    Sign up×
Community /Pin to ProfileBookmark

IE Margin Error

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

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogAug 06.2006 — Fix number 1: make sure you begin your document with a [url=http://www.w3.org/TR/html4/struct/global.html#h-7.2]doctype declaration[/url] (see this [url=http://www.w3.org/QA/2002/04/valid-dtd-list.html]list of recommended doctypes[/url]) so that IE is not in "quirks mode".
Copy linkTweet thisAlerts:
@KorAug 06.2006 — 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.
Copy linkTweet thisAlerts:
@pacerierAug 06.2006 — 

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[/QUOTE]


its best if you would elaborate on the problem. like [i]doubling the margin[/i] sounds weird? perhaps you may try [b]style="margin:0px;"[/b] 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
Copy linkTweet thisAlerts:
@WebJoelAug 06.2006 — 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:

[B]<style type="text/css">

body, html {margin:0; padding:0; border:0;} /* Re-sets IE to "zero" for these values */



</style>[/B]


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
Copy linkTweet thisAlerts:
@aklahauthorAug 08.2006 — 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
×

Success!

Help @aklah spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...