'Why is my backround image is not working in css?+
so I had this problem that makes me impatient this is my code.
.column {float: left;}
.column.side {width: 25%;}
.column.middle {width: 50%;}
.row:after {content:"";
Display: table;
clear:both;}
.column.middle p {backround-color:#58bf96;
padding:10px;
font-size:20px;}
.column.middle img {padding-top:20px;}
body {backround-image: url('https://wallpaperaccess.com/black-galaxy.jpg');
backround-repeat: no-repeat;
backround-size: cover;}
even I copied my teacher's example, it is still white background. Anyone help me here?
Solution 1:[1]
Try this:-
You background spelling was wrong & you need to also give width and height with background as given below:-
body {background: url('https://wallpaperaccess.com/full/7563778.jpg'); width:100vw; height:100vh; background-repeat: no-repeat;
background-size: cover;}
Solution 2:[2]
First of all your link is not correct. I mean there is no image in that link(https://wallpaperaccess.com/black-galaxy.jpg)... After that your tag name is wrong..
Use background instead of backround
Then run again and it will be working fine.
body {
background-image: url("https://wallpaperaccess.com/thumb/1457543.jpg");
background-repeat: no-repeat;
background-size: cover;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohammad Sajid Choudhary |
| Solution 2 | shourov_return0 |
