how to make an image occupy entire page css

Solutions on MaxInterview for how to make an image occupy entire page css by the best coders in the world

showing results for - "how to make an image occupy entire page css"
Emelie
19 Nov 2017
1img.bg {
2  /* Set rules to fill background */
3  min-height: 100%;
4  min-width: 1024px;
5	
6  /* Set up proportionate scaling */
7  width: 100%;
8  height: auto;
9	
10  /* Set up positioning */
11  position: fixed;
12  top: 0;
13  left: 0;
14}
15
16@media screen and (max-width: 1024px) { /* Specific to this particular image */
17  img.bg {
18    left: 50%;
19    margin-left: -512px;   /* 50% */
20  }
21}