I am using bootstrap card https://getbootstrap.com/docs/4.0/components/card/ to show a image,the problem is on bootstrap templete it just add a margin , I would like to make only the image to stay o full width of the div, if somebody have a solution it would be appreciated, thanks in advance.
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- card documentation https://getbootstrap.com/docs/4.0/components/card/ -->
<section >
<div class="card text-center">
<div class="card-header" style="background-color:white">
Card Header
<div class="card-body">
<center>
<!-- img I need full page size on card body -->
<div class="view overlay zoom">
<img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/6-col/img%20(131).jpg" class="img-fluid " alt="smaple image">
</div> </center>
<p class="card-text">card description</p>
<div class="card-footer text-muted" style="background-color: white">card footer</div>
</section>
<div class="view overlay zoom" />
or<div class="card" />
? By the way, in your HTML layout, you have.card-body
nested inside.card-header
. – David Liang<div class="card-body" />
has default 1.25 rem padding there (not margin). Do you not care about the padding and just want the image to be absolute 100% width of that, or you do want to accommodate the padding? – David Liang