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

Home Forums CSS Margin messes up background cover property on IE

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #206084

    Is it a bug? Removing the margin or setting width to 100% works fine (and no issue with other browsers)…


    Edit – things seem different if height is set to 100vh so I may have to investigate further on that.


    Okay, know how to solve it – setting any height that’s not a percentage makes the cover property have effect. So min-height: 100vh should work and not be too superfluous :


    Kinda curious why though. I know there’s the odd thing with body and html and a minimum height in relative units. But that’s doesn’t explain why the image is showing at all then in IE and why viewport units are indeed a solution in this case.

    And then there’s the margin thing…


    Definitely related to body having an outer height equal to zero (which explains the no margin thing as well).

    If it’s not a bug then I’m betting on some other insect.

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