I am trying to have an image that covers the whole screen (without margin or padding) on small devices. Techniques propsed on this post unfortunately did not work for me.
Here is the code I currently have. (tested on https://jsfiddle.net/
).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid bg-primary">
<div class="row">
<div class="col-md-9">
<div class="image-wraper">
<figure class="figure">
<img
src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/8-col/img%20(73).jpg"
class="figure-img img-fluid rounded shadow-3 mb-1"
alt="Taking up Water with a Spoon"
style="height: 100%; width: 100%; object-fit: cover;"
/>
<figcaption class=" figure-caption">A caption for the above image.</figcaption>
</figure>
</div>
</div>
<div class="col-md-3">
...
</div>
</div>
</div>
</body>
</html>
There is still a margin on the left and right. How can I remove it on screen less than or equal to sm
?