My problem is that my background to my website always turns white whenever I scroll down.
<div align="center"><img src="bakrund.jpg" class="bg"></div>
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -5000;
}
You should use the background attribute of body in your css to define the background image, like this:
body
{
background-image:url('bakrund.jpg');
}
Don't try to hack it in using a div.
If you're trying to set a background image do this
<style>body { background-image:url("YOURURL"); } </style>
It's much easier and is a lot more professional.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With