Rounded borders on gallery images (3 posts)

  1. Ashley Michèlle
    Posted 3 years ago #

    Hello! I have run in to yet another headache...
    I can't seem to get both the image AND the border rounded off, for the WordPress gallery images (as can be seen here: http://nwimt.com/bearings/).

    My CSS:

    .attachment-thumbnail {
    	-webkit-border-radius: 20px!important;
    	-khtml-border-radius: 20px!important;
    	-moz-border-radius: 20px!important;
    	border-radius: 20px!important;
    	border: 5px solid #262626!important;

    This is easily executed when the image is a background-image, but when it is an "img" it seems to only partially work, as in the fact that the border rounds nicely, but the image sits on top of it, and remains with the square edges.

    Been playing with this for hours to no avail. If anyone can shed some light on how to go about resolving the issue, I would be extremely grateful!

    Thank you in advance!

  2. dmd54
    Posted 3 years ago #

    In your main style.css add:

    img {
     border-radius: 20px
  3. dmd54
    Posted 3 years ago #

    ...Oh and don't forget the semi-colon, 20px;

Topic Closed

This topic has been closed to new replies.

About this Topic