1

i have two divs one floated to the left and the other to the right and after them i have added a div with style clear:both

after that i have an other div with a margin-top : 35px the margin is shown as expected in IE7 FF Chrome and opera but can't see it on IE8 any ideas ?

2 Answers 2

1

I can't tell from what you've posted but if the div giving you problems is empty, this could be an issue. If that is the case, try adding   into it.

4
  • I would love an explanation too! That was driving me crazy the other day.
    – Jon
    Mar 31, 2010 at 12:56
  • I can't explain it but it's something with lots of people running into. It's not a new issue with IE - has been around for quite a while. google.com/…
    – Jaxidian
    Mar 31, 2010 at 13:01
  • An empty div doesn't take up any space, therefore doesn't count as something that needs 'spacing from' using margin Mar 31, 2010 at 13:06
  • @Yassir: If this fixes the issue for you, could you mark it as answered so it doesn't show up in the Unanswered Questions list?
    – Jaxidian
    Mar 31, 2010 at 16:46
1

I had this problem the other day. I'm not sure why it is occurring and I am far from an expert on the topic but to solve it I added padding bottom to the floated divs and it gave the same effect I was looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.