Can I use a CSS (or other) technique to round the corners of an image, or do I actually have to round the corners of the image in an image editor?

2 answers

This was chosen as the best answer

You can style a div with rounded corners and simply apply the image as the background.

<div style=" width:80px; height:80px; -moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px; background-image:url('');">

However, this only works in browsers that support rounded corners via CSS, so actually rounding your images is always the best way of ensuring the visual output.

Answered about 8 years ago by Gary Hepting
  • A good technic while we waiting for CSS3 support is Karate Corneres: Tae about 8 years ago
  • Forgot about the whole background-image url thing. Thanks! Daniel Huckstep about 8 years ago

I'd go with Gary's suggestion.

Answered about 8 years ago by Matt Lee