PDA

View Full Version : Different AP-positioning in IE7?


olivjuice
04-09-2009, 07:02 PM
Hi!

I've noticed that my relative AP-divs have different positions in Internet Explorer 7. In Mozilla Firefox, Google Chrome, IE 8 and so on it looks just fine, but in IE 7 all the divs have been moved liked 7 px down. I'm very new in making own sites, but can you code so the relative ap-divs have a different position in Internet Explorer 7? Hope I made myself clear! ;-)

// Albin, Sweden

Cary
04-09-2009, 11:59 PM
Welcome, Olivjuice.

Try this CSS:

body {
margin:0;
padding:0;
}

olivjuice
04-10-2009, 09:37 AM
Where should I write that?


My code right now for the ap-divs is:
#apDiv2 {
position:relative;
width:342px;
height:115px;
z-index:2;
left: -120px;
top: -7px;
margin-right: auto;
margin-left: auto;
}

Should I write it in like this?:


#apDiv2 {
position:relative;
width:342px;
height:115px;
z-index:2;
left: -120px;
top: -7px;
margin-right: auto;
margin-left: auto;
body {
margin:0;
padding:0;
}

Corrosive
04-10-2009, 11:41 AM
Where should I write that?


My code right now for the ap-divs is:
#apDiv2 {
position:relative;
width:342px;
height:115px;
z-index:2;
left: -120px;
top: -7px;
margin-right: auto;
margin-left: auto;
}

Should I write it in like this?:


#apDiv2 {
position:relative;
width:342px;
height:115px;
z-index:2;
left: -120px;
top: -7px;
margin-right: auto;
margin-left: auto;
body {
margin:0;
padding:0;
}

No, just add it to your body styles if you have any.

More like...

#apDiv2 {
position:relative;
width:342px;
height:115px;
z-index:2;
left: -120px;
top: -7px;
margin-right: auto;
margin-left: auto;
}
body {
margin:0;
padding:0;
}

olivjuice
04-10-2009, 12:33 PM
It worked! :grin:

This problem has driven me crazy for a long time!

THANKS A LOT! :-D