...

View Full Version : Div spacing & z-index issue in IE7 and below



vraymer
12-13-2009, 10:58 PM
Hey Helpful Folks,

I'm having an issue in IE7 and below. My Header div isn't responding to the 104px Top Margin and is pressed to the top of the page beneath my logo/nav. If I float the Header div or set it to absolute it will push out to the right?

It works fine in FF and IE8. Please Help!

http://littletdesigns.com

This CSS code is my <!--[if lt IE 8]>

<code>
#wrapper #top-container {
width: 900px;
height: 187px;
clear: left;
float: left;
}
#wrapper #top-container #logo {
clear: left;
float: left;
width: 386px;
height: 187px;
background-image: url(../images/logo.png);
background-repeat: no-repeat;
position: absolute;
z-index: 1;
}
#wrapper #top-container #navigation {
width: 330px;
clear: right;
float: left;
height: 187px;
position: absolute;
z-index: 1;
}
#wrapper #header {
width: 900px;
height: 284px;
margin-bottom: 25px;
margin-top: 104px;
float: none;
clear: left;
z-index: 0;
position: relative;
}
</code>

Excavator
12-13-2009, 11:08 PM
Hello vraymer,
Have a look here - http://validator.w3.org/check?verbose=1&uri=http%3a%2f%2flittletdesigns.com%2f

Fixing those errors may or may not fix your problem...but it's certainly a good place to start.

vraymer
12-13-2009, 11:39 PM
Hey Excavator,

Thanks for the Validator Link... helped me notice a few silly errors I made.

I still don't know how to fix the embedded .swf file errors (I just inserted media and let Dreamweaver write the code... so don't know how to fix those?)

The other changes didn't have an effect on my z index/ spacing issues. Any ideas... any help would be amazing!

Thanks again!

vraymer
12-14-2009, 12:07 AM
I was able to fix it... by cheating haha

put a 104 padding on top of the Header Div

Excavator
12-14-2009, 01:31 AM
I was able to fix it... by cheating haha

put a 104 padding on top of the Header Div

I'm sorry but no time to look at it for a bit... it really sounds like you have uncollapsing margins. See my example here (http://nopeople.com/CSS/uncollapsing-margin/index.html).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum