making a site for my sculptor friend. however, the “#index_main” 's “margin-top” size is being doubled in IE6 and IE7.
looked back in my previous threads for a while and tried various things like overflow: hidden on it, but nothing. tried other things, but still nothing.
i am going to add a JS animation on her long image which should be pretty cool.
You might have a little more luck if you got rid of all the unnecessary containers, and sticking yourself with outdated coding techniques by way of the tranny doctype. Tranny is for supporting old/outdated/half-assed techniques, not for building new websites.
For example you aren’t doing anything that warrants the double outer wrapper (inner-div and outer-div), a single pagewrapper would do just fine. There’s no real reason to have a ID on the h1 since you should only have a single h1 per page, the #header DIV doesn’t actually DO anything that you need done, the image in the H1 isn’t just a missed SEO opportunity, it’s presentation for text so I’d get a image replacement on that, #menu is pointless, that presenational image (nav-bg_right) has no business even being in the markup, #banner could probably go given the fixed height /fail/ inside the slider. (there’s a reason I wouldn’t put that js nonsense on a page in the first place), the li around the div and h2 doesn’t seem semantic since the sections are not related and/or bullet points and/or even list items, the presentational classes “leftPan”, “middlePan”, etc don’t say what the sections are so one may as well go back to using HTML 3.2, you aren’t applying any formatting that should warrant needing classes on every paragraph (serious whiskey tango foxtrot), again you have presnetational images in the markup (have you seen what the page does CSS off?) and that’s before we talk about things like the fixed width that’s not even 1024 friendly and the use of fixed metric fonts being an accessibility /FAIL/.
Margin? Least of your problems. Though it could be worse, you could have someone telling you to use a clearing div like it was still 2002. Oh wait!
Hi, untested but normally if the margins’ being doubled , then normally an element needs haslayout or something :). The school computers here don’t have IE so I can’t test, but try and see if *{zoom:1;} fixes it. If it does, then just find which element needs haslayout :). I will be gone the rest of the day (work then another class then gym) but if you haven’t figured this out by then and noone else has helped then I’ll be back late tonight
There is really no need for it anyways. IE6/7 will contain their floats when haslayout is set and modern browsers just need the overflow property set on the floats parent.
You have a bad habit going on with the rest of your code. You are wrapping divs around everything and then wrapping them again.
You have two page wrappers when only one is needed. You have wrapped the h1 in a div called header. Then it was nested in a div called top. You have wrapped both your ul’s in divs when the ul itself could have been styled.
Here is your code with all the unnecessary divs removed -