A grey outline keeps appearing on the img section of my bootstrap card, which I would like to remove.
<!-- Card deck -->
<div class="card-deck">
<!-- Card -->
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="card mb-4">
<!--Card image-->
<div class="view overlay"><img alt="Work eyewear" class="card-img-top img-fluid" src="img/clothing-1.jpg"></div><!--Card content-->
<div class="card-body">
<!--Title-->
<h4 class="card-title">PPE</h4><!--Text-->
<p class="card-text">PPE is equipment that will protect the user against health or safety risks at work...</p><!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
<a class="" href="https://shop.spartansafety.co.uk/personal-protection-s/1820.htm">SHOP NOW <i class="fas fa-arrow-right fa-xs"></i></a>
</div>
</div>
</div><!-- Card -->
Use border-0 for the cards to remove border top, right, bottom, and left.. To remove radius, use no-radius . Show activity on this post. So simply adding class="accordion" makes the 'inner' borders the same width as the 'outer' ones.
There are border utilities that can help with this. From the link:
Subtractive
<span class="border-0"></span> <span class="border-top-0"></span> <span class="border-right-0"></span> <span class="border-bottom-0"></span> <span class="border-left-0"></span>
So for your scenario, since you want to remove all borders you would add the border-0
CSS Class to your card
like so:
<div class="card mb-4 border-0">
</div>
If you check the .card
class has a border: 1px solid #e5e5e5;
To remove it simply override it to border: none;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With