After applying the CSS code below in an attempt to fill my page entirely with an image from my computer, I ended up with unexpected results:
#background {
background-image: url("anFtp");
position: fixed;
height:100%;
width:100%;
z-index: -1;
float: left;
}
https://i.sstatic.net/yZW8t.jpg
Notice the white space on the top and left of the page. Despite trying various solutions, this is how my code currently looks. Initially, it was like this:
#background {
background-image: url("anFtp");
position: fixed;
width: 1600px;
height: 900px;
z-index: -1;
}
I have attempted different recommendations, such as changing 1600px
and 900px
to 100%
, yet most suggestions point out errors made by others rather than addressing any actual flaws in the code itself.
EDIT / addition to below answer
Implementing the solution provided in the response below did address some of the issues, but now the display appears like this: