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,639
  • 6
  • 40
  • 49
user3331232
  • 301
  • 1
  • 2
  • 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
  • 24,871
  • 12
  • 85
  • 147
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,823
  • 6
  • 25
  • 47