Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] IE no negative margin, top:-value adds height, how to fix

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #187337
    ms_buggy
    Participant

    I’m trying to add div over another div with negative margin, this works well in other brosers except in IE. If I use position relative and top: with negative value, it works in all brosers, BUT the I get wrong height, because the negative is not calculated off from parent div height?

    How could I fix this? Thank you in advance!

    #187341
    Paulie_D
    Member

    We need to see what you have.

    Could you show us the HTML & CSS in a Codepen.io demo?

    #187389
    ms_buggy
    Participant

    Here you go, this one is with negative margin.
    Sorry for the long css. I stripped only the html.
    http://codepen.io/anon/pen/Fzmpe

    EDIT: OH my, there was one floating img messing up the negative margin. That fixed it. Sorry for the trouble!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.