WordPress.org

Ready to get started?Download WordPress

Forums

Rounded borders on gallery images (3 posts)

  1. Ashley Michèlle
    Member
    Posted 1 year 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;
    	padding:0px!important;
    	margin:0px!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
    Member
    Posted 1 year ago #

    In your main style.css add:

    img {
     border-radius: 20px
    }
  3. dmd54
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic