div positioning browser issues

Out of context: Reply #11

  • Started
  • Last post
  • 17 Responses
  • Hombre_Lobo0

    ^thats just how position relative works.
    Position absolute essentially takes the div off the page and floats it (either above or below depending on the zindex). Position relative is often the default position style for most HTML elements. So adding it often does nothing.

    As you've said it doesn't have a CSS reset so it's very likely a margin or padding issue. Be sure to set them to 0 if not being used. If its not that it may be a border-box: issue. You can see this in the chrome inspector (apple+alt+I).

    If you wanted to use position relative and the div in question has a set size, you could position relative the element, zindex 2, and put a minus margin on the bottom to pull up the content below it to be behind (just like position absolute). But this method isn't ideal at all.

    If you could use css you could use an ie only conditional CSS rule.
    http://www.paulirish.com/2008/co…
    Hope that helps

View thread