I have an image that should be full width at the top of a screen. I've removed padding left and right using px-0 but this has affected the page. I am now able to move around the page with the cursor. I do not want that to be the case
<div class="container-fluid px-0">
<div class="row d-none d-md-block">
<div class="col-12">
<img src="~/images/banners/group_full.png" alt="Image of a group of people" class="img-fluid" />
</div>
</div>
</div>
Besides adding Bootstrap class
px-0to thecontainer-fluid, you also need to addmx-0to therowandpx-0to thecol-12.Generally speaking, Bootstrap adds margins and paddings to all elements. In case you have a similar problem in the future, always check margins and paddings of all elements (
container-fluid,row,col, etc.).See the snippet below.