Jump to content

Webkit border around elements with border radius does not follow curve


afish674

Recommended Posts

I have several images on my site that use the border radius property. This works fine. However, I have added a class which adds a white, 3px border around the image. This works fine in IE9 and Firefox but in Webkit browsers the border doesn't work on the corners (it borders the original square path before it has been rounded). Is there a way to fix this? (I tried changing the order the classes appear so that the border radius came before the border class but this made no difference.)

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

If the browser is doing it that way then there's nothing you can do to fix it.On solution would be to have a <div> or <span> element display as an inline-block and use a background-image instead. You would need to specify the width and height of the image on the element. The image would lose its semantic meaning which means that search engines and machines wouldn't recognize it as an image.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...