/    Sign up×
Community /Pin to ProfileBookmark

Div’s Display in Firefox but not in IE7

Hi,

Everything displays properly in firefox but nothing shows up in IE7.

[code=php]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>The Anngora Company | Giving is Chic </title>
<link rel=”stylesheet” type=”text/css” href=”global.css” />
<!–[if IE 7]>
<link rel=”stylesheet” type=”text/css” href=”ie-7fix.css” />
<![endif]–>
<!–[if IE 6]>
<link rel=”stylesheet” type=”text/css” href=”ie-6fix.css” />
<![endif]–>
</head>

<body>
<div id=”background”>

<div id=”logo-title”>
</div>

<div id=”slogan”>
</div>

<div id=”navigation”>
</div>

<div id=”home-content”>

<div id=”var1″><!–eventually create a better name for the div’s with ‘var’ as their name–>
</div>

<div id=”var2″>
</div>

<div id=”var3″>
</div>

<div id=”var4″>
</div>

<div id=”var5″>
</div>

</div><!–closgin tag for ‘home-content’–>

<div id=”choice-1″>
</div>

<div id=”choice-2″>
</div>

<div id=”choice-3″>
</div>

</div><!–closing tag for ‘background’–>

</body>
</html>
[/code]

Heres the CSS:

[code=php]@charset “utf-8

body {
margin: 0;
padding: 0;
background-color: #000000;
}

#background {
width: 905px;
margin: 0 auto; !important;
border: 1px solid black;
padding: 1em;
}

#logo-title {
width: 345px;
height: 230px;
border: 1px solid black;
background-color: green;
}

#slogan {
width: 398px;
height: 101px;
border: 1px solid black;
position: absolute;
right: 215px;
top: 155px;
margin-bottom: 1em;
}

#navigation {
width: 866px;
height: 70px;
border: 1px solid black;
margin-top: 1em;
margin-bottom: 1em;
}

#home-content {
width: 866px;
height: 180px;
border: 1px solid black;
}

#var1 {
width: 100px;
height: 75px;
border: 1px solid black;
margin-left: 10px;
position: relative;
top: 10px;
}

#var2 {
width: 100px;
height: 75px;
border: 1px solid black;
position: absolute;
top: 372px;
left: 300px;
}

#var3 {
width: 100px;
height: 75px;
border: 1px solid black;
position: absolute;
margin-left: 10px;
top: 459px;
}

#var4 {
width: 100px;
height: 75px;
border: 1px solid black;
position: absolute;
top: 459px;
left: 300px;
}

#var5 {
width: 553px;
height: 163px;
border: 1px solid black;
position: absolute;
right: 226px;
top: 369px;
}

#choice-1 {
width: 250px;
height: 250px;
border: 1px solid black;
margin-top: 75px;
}

#choice-2 {
width: 250px;
height: 250px;
border: 1px solid black;
position: absolute;
top: 618px;
left: 490px;
}

#choice-3 {
width: 250px;
height: 250px;
border: 1px solid black;
position: absolute;
top: 618px;
left: 795px;
}[/code]

Any help will be much appreciated. again the page in IE7 is totally blank.

Thanks,
jbell

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 31.2009 — missing quote and semi-colon

@charset "utf-8[COLOR="Blue"]";[/COLOR]

and !important comes before the semi-colon

margin: 0 auto !important;
×

Success!

Help @jamez1515 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...