Arbiz
Arbiz

Reputation: 182

css background-size and html email

I use the following to crop and center a picture with css (sorry for inline css but this is just to explain my problem)

<div style="width: 236px;height: 233px;background-image:url('path-to-picture');background-size:cover;background-position:center center"></div>

This works fine on most browsers but I need to reproduce the same in an html email and unfortunately emails clients don't seem to recognize 'background-size'.

Is there a simple way to crop pictures in an html email?

Thanks for your help.

Upvotes: 5

Views: 5070

Answers (1)

Kenneth Kogi
Kenneth Kogi

Reputation: 41

background-size is not supported by a lot of email clients. It's highly discouraged. See Which email clients support CSS3?

Upvotes: 3

Related Questions