views:

136

answers:

3

Hi all,

I'm having some problems with a certain piece of code which sits in my site; this error only occurs in Internet Explorer 7.

Rather than post all my HTML/CSS markup here I have put up a version of the site here.

As you can see I have "Widgets" in columns, for some reason IE7 adds an extra space under the Widget Header while FF displays it fine without any space.

This error does not occur in IE8, FF3, Opera, Safari or Chrome.

Can anyone suggest why this occurring and if possible, a fix?

Thanks in advance!

A: 

Unfortunately IE 7 doesn't run very well on Ubuntu so I'm unable to reproduce your error, but have you tried resetting your CSS with a stylesheet like Reset CSS?

There is also a great site about browser quirks that you might want to have a look at.

André Laszlo
Yes I already use a reset.css and font.reset.css available from YUI. This is being used on the test site I have put up.
schone
Oh sorry, I should have looked at your code before giving such an obvious answer. Theres also the classic "border: 1px solid red" to try to figure out which elements makes your layout go haywire... :)
André Laszlo
Yep I have tried that to try any debug but it didn't really provide any help to figuring out why it is occuring :S
schone
A: 

Did you start by zero'ing out all of your element by doing a CSS reset? I see you have a few different elements in your div, it's possible that one of these has a default marin in IE7 that is throwing everything out of wack...

Zachary
Yes I already use a reset.css and font.reset.css available from YUI. This is being used on the test site I have put up.
schone
+5  A: 

Add this css to wgt-wrap and it should behave.

zoom: 1

Google for hasLayout for explanation.

[EDIT] This discussion provides more insight into this IE bug. http://stackoverflow.com/questions/1162625/why-does-internet-explorer-need-the-haslayout-flag

Chetan Sastry
Thanks Chetan! That fixed it!!!
schone
Cool, I'll try to remember this! Great tip.
André Laszlo