@vivekrahulSubmitted over 1 year ago
How to apply border-radius to an image? i tried making a div for the same but it didn't work for 5 % value? Can you all suggest something for the same ?
How to apply border-radius to an image? i tried making a div for the same but it didn't work for 5 % value? Can you all suggest something for the same ?
Using the overflow property on a parent container for an image is an easy way for the parent div and the image to have the same border radius. An important note, the image must be as big as the parent container.
.image-div { display: inline-block; border-radius: 20px; overflow: hidden; } .image { text-align: center; padding: 15px; width: 100%; height: 100% }