0

I have to fix by HTML page's background for full width, but the height of the background is not as per my design. How can I fix it?

CSS Code:

html {
    background: url(images/body_bg.jpg') no-repeat top left fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
MarmiK
  • 5,440
  • 6
  • 37
  • 45
user3331232
  • 181
  • 1
  • 1
  • 6

2 Answers2

1

You're missing a ' in the url

background: url('images/body_bg.jpg') no-repeat top left fixed;

Demo

Zach Saucier
  • 23,662
  • 12
  • 81
  • 137
0

Use background-size like the one used below,

body {
  background-image: url(image1.jpg) no-repeat;
  background-size: 100%;
}  

Some useful links :

Scale background image style

Stretch and Scale a CSS image Background - With CSS only

Community
  • 1
  • 1
Kapil
  • 1,743
  • 6
  • 22
  • 42