-4

enter image description here

I am getting a background image from external CSS to display. When I check in the element inspector it shows me invalid property used.

body {
  font-family: 'Helvetica Neue', Arial, Helvetica, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-image: url(../img/background.jpg);
  background-size: cover;
  overflow: hidden;
}

What am I doing wrong here?

Aasim
  • 3
  • 2

2 Answers2

0

Use 'background', not 'background-image'. I.e.

background: url(../img/background.jpg);
Tom Reeves
  • 123
  • 2
  • 13
0

You have written background-image:url(..img/background.jpg) this is correct,may be you have inserted a wrong path or may you have leave a space in "background.jpg" file like this.."backgroung .jpg" While crating th image name.. Check it out..i have leave a large space in image file for ur understanding,there may be one space only