Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4 img-circle class doesn't seem to exist

I'm writing a website in HTML5 and Bootstrap 4 and I'm trying to turn a square image into a circle. In Bootstrap 3 this was easily do-able with .img-circle, but now I can't seem to get it to work and I can't find any answers online. Has Bootstrap dropped the img-circle class or is my code messed up?

It goes something like this:

<!-- Within a tab-content div --> 
<div class="col-xs-7">
    <img src="img/gallery2.JPG" class="img-circle" alt="HelPic">
</div>

Hope somebody can help me out :)

like image 833
Cal Courtney Avatar asked Dec 07 '16 13:12

Cal Courtney


2 Answers

It's now called rounded-circle as explained here in the BS4 docs

<img src="img/gallery2.JPG" class="rounded-circle">

Demo

like image 162
Zim Avatar answered Oct 16 '22 14:10

Zim


In Bootstrap 4 and Bootstrap 5 it was .rounded-circle

Usage :

<div class="col-xs-7">
    <img src="img/gallery2.JPG" class="rounded-circle" alt="HelPic>
</div>

See migration docs from bootstrap.

like image 6
sisindrymedagam Avatar answered Oct 16 '22 15:10

sisindrymedagam