1
 =image_tag "#{user.image}", :class => "user-photo"

this code above set the image, but I want all images to be circular. If a user uploads a photo with the wrong dimensions, setting the border radius to 50% results in an oval photo, instead of a circular one.

I'm thinking if I can set the interpolated image inline as a background image, I can then make them all circular.

NewGuy504
  • 143
  • 1
  • 9

1 Answers1

0
.circular {
    width: 300px;
    height: 300px;
    border-radius: 150px;
    -webkit-border-radius: 150px;
    -moz-border-radius: 150px;
    background: url(http://link-to-your/image.jpg) no-repeat;
}

http://bavotasan.com/2011/circular-images-with-css3/

itzmurd4
  • 663
  • 10
  • 25