/    Sign up×
Community /Pin to ProfileBookmark

Margin problems in Firefox

I’m having problems trying to line up this container box in Firefox. Again, it lines up perfectly in Internet Explorer, but doesn’t line up in Firefox.

[URL=http://img528.imageshack.us/my.php?image=ieexamplebe6.gif][IMG]http://img528.imageshack.us/img528/848/ieexamplebe6.th.gif[/IMG][/URL]
[URL=http://img100.imageshack.us/my.php?image=firefoxexamplenv0.gif][IMG]http://img100.imageshack.us/img100/6416/firefoxexamplenv0.th.gif[/IMG][/URL]

And here’s my code:

[CODE]
html, body {background-color: #ebebeb;
background-image: url(“midnight_background.gif”);
background-repeat: no-repeat;
background-position: 50% 50%;
padding: 0;
margin: 0;
height: 100%;
font-family: lucida sans;
font-size: 10pt;
color: #000000;}

#MainContainer {background-color: #ffffff;
padding: 10px;
margin-top: 45px;
margin-left: 40px;
border: solid thin #c0c0c0;
width: 880px;
height: 450px;}[/CODE]

Any solutions to make this problem disappear?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelAug 19.2006 — I'm sort of at a loss as to what the difference is, -but when I placed your code in a document that begins with:

<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

I am not seeing any noticeable differances between the two browsers...

Are you using a valid !doctype in your document? If not, IE is probably rendering the page badly (that is to say, IE is doing it wrong and it 'looks okay". Using a VALID !doctype forces IE to display it CORRECTLY, even if it is shows the page as busted, vis Firefox, Mozilla, Opera et~al...).

If this doesn't help, post all your code or URL if it's online.

?
×

Success!

Help @SithLordVader 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.18,
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,
)...