In HTML and CSS, I need to create perfect circle img elements, where the src is set to various logos. The issue arises when I apply a 50% border-radius,parts of each logo get blocked out circularly as if there were a thick border set.
In the provided image, it can be seen I’ve set the following properties: nothing works.
border-style: none;
border-width: 0;
outline-style: none;
outline-width: 0;
overflow: visible;
(thought that last one would work for sure)
2
Answers
For perfect circles with images, applying a border-radius often crops parts of the image. Instead, you can try using the object-fit property along with object-position to maintain the logo’s visibility within the circle. For instance:
This should help in displaying the logos within perfect circles without cropping.
you can try add the image tag inside a div with equal width and height and also the 50% border radius. It will defenitely help you to fit a image inside a perfect circle
example:-