Forums

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

Home Forums CSS [Closed] How can I make tag behave like background-size: cover;? Reply To: [Closed] How can I make tag behave like background-size: cover;?

#158378
__
Participant

The only thing that sucks is you have to use inline styling to change the photo for each card. That’s kind of whack. I don’t really like my HTML and CSS to mix.

Well, if an <img> element would be appropriate otherwise, then I think it’s safe to consider the background image “content” and not “presentation.” I think it’s fine to keep it in the markup. Actually, I’m taking the same approach right now with a slideshow (though not because of background-size).

As for being “legit,” looks like the answer is IE9+ (except for Opera Mini).