"Image circle ratio respect"
Bootstrap 3.3.0 Snippet by unbekannt3DE

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Any image, size doesn´t matter, centered and respecting ratio</h2> </div> <div class="row"> <div class="col-sm-2"> <p> Image in to circle</</p> <div class="ratio img-responsive img-circle" style="background-image: url(https://slash.unbekannt3.eu/mein_forum/img/avatars/unbekannt3.default_avatar.png);"></div> </div> <div class="col-sm-10"> <p> Real image</p> <img src="https://slash.unbekannt3.eu/mein_forum/img/avatars/unbekannt3.default_avatar.png"> </div> </div> </div>
.caption div { box-shadow: 0 0 5px #C8C8C8; transition: all 0.3s ease 0s; } .img-circle { border-radius: 50%; } .img-circle { border-radius: 0; } .ratio { background-position: center center; background-repeat: no-repeat; background-size: cover; height: 0; padding-bottom: 100%; position: relative; width: 100%; } .img-circle { border-radius: 50%; } .img-responsive { display: block; height: auto; max-width: 100%; }

Related: See More


Questions / Comments: