4

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.

Arbiz
  • 172
  • 1
  • 5
  • 12
  • Possible solution: http://stackoverflow.com/questions/8015515/background-image-css-inside-an-html-email-gmail-does-not-support – K K Mar 30 '15 at 05:47
  • 2
    Better solution is use any photo editing software and make specific image for email. – Kheema Pandey Mar 30 '15 at 05:50

1 Answers1

3

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