body, html { height: 100%; } .bg { /* The image used */ background-image: url("img_girl.jpg"); /* Full height */ height: 100%; /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover; } <;img src="images/index.jpg" width="1920" height="1080" alt="">