I have a little problem with my code but I can't find where is the issue. If I use a backgraund in css with the "body" tag, it shows, but if I do the same with a div, it remains in white.
The code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/script.js"></script>
</head>
<body>
<div id="one">
<header>
</header>
<section>
</section>
<footer>
</footer>
</div>
</body>
</html>
css
#one{
background: url(../img/background.jpg);
background-repeat: repeat;
background-size: cover;
display: block;
height: 100%;
width: 100%;
}
and a javascript (just incase)
$(function(){
var x = 0;
setInterval(function(){
x-=1;
$('body').css('background-position', 0 + 'px '+ x +'px');
}, 200);
})
I tried with the 'body' and it works, but only with the body :(