Reputation: 1
I managed to put a background image -only with css- which covers the whole page and if you zoom in or zoom out it stays covering the full screen. I started with html+css coding but ended up with this more simple solution.
The problem is it only works on Chrome and the picture doesn't even appear when oppening with Firefox or IE.
Here is my css:
body {
background-image: url(/img/18A_0159.JPG);
background-size: cover;
}
I tried different solutions as for exemple to put it directly in the css's html part but still only works in Chrome, also checked different forums but maybe too old and not been updated?
I'm pretty new into coding so any help is welcome! Maybe better html+css??
Upvotes: 0
Views: 111
Reputation: 1
Try this
body{margin: auto;
padding: 0px;
background: url(images/bg.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;}
Upvotes: 0
Reputation: 1
body{
background: url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQvRaBo6ZZdUBrwsgfzubKwSf-E6Bsqm1RkfmGh8X40uiSVV-fSNw);
background-size: cover;
}
Upvotes: -1
Reputation:
Your url needs to be in quotes.
body {
background-image: url("/img/18A_0159.JPG");
background-size: cover;
}
Upvotes: 2