Bootstrap Round-circle Class Elements With Border And Padding
I have a bootstrap carousel with multiple items. My html:
Solution 1:
You should put the images inside col divs, and make them responsive using img-fluid
...
<divclass="carousel w-100"data-ride="carousel"id="recipeCarousel"><divclass="carousel-inner text-center w-100"role="listbox"><divclass="carousel-item d-flex row active"><divclass="col-sm-12 col-md-4"><imgclass="rounded-circle img-fluid mystyle"src="//placehold.it/300"></div><divclass="col-sm-12 col-md-4"><imgclass="rounded-circle img-fluid mystyle"src="//placehold.it/300"></div><divclass="col-sm-12 col-md-4"><imgclass="rounded-circle img-fluid mystyle"src="//placehold.it/300"></div></div></div></div>
Then there will be no overlap.
https://www.codeply.com/go/b7DE9Q6AOm
Solution 2:
Put every image inside a container.
.round-container{
display:inline-block;
margin:10px;
}
<linkhref="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"rel="stylesheet"integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"crossorigin="anonymous"><scriptsrc="https://code.jquery.com/jquery-3.2.1.slim.min.js"integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"crossorigin="anonymous"></script><divclass="round-container"><imgclass="rounded-circle"src="https://via.placeholder.com/100x100"width="100"></div><divclass="round-container"><imgclass="rounded-circle"src="https://via.placeholder.com/100x100"width="100"></div><divclass="round-container"><imgclass="rounded-circle"src="https://via.placeholder.com/100x100"width="100"></div>
Post a Comment for "Bootstrap Round-circle Class Elements With Border And Padding"