I am creating a website and am placing an image on the homepage that should cover the entire page. Despite multiple Google searches and attempts, there is still a margin/padding on the top, left, right, and bottom.
Here is my current CSS code for the image:
.tiger-woods-img {
display: block;
line-height: 0;
margin: 0 !important;
padding: 0 !important;
width: 100%;
height: auto;
}
This is how the webpage looks with this code (it is hard to see since the background is white, but there is a small margin/padding on all sides of the image):
I tried to include the following code:
* {
margin: 0;
padding: 0;
}
And it worked, but it messed up my navbar.
Is there another solution for this issue?