2

I am trying to add a background image to my html by using the background property but it's showing invalid in my browser. I looked for the error and found this question with same problem. Still not able to figure out the problem.

Here is my code of css:

#showcase {
  background: url("../img/showcase.jpg") no-repeat top center fixed/cover;
  position: relative;
  min-height: 650px;
  color: #fff;
  padding-top: 6rem; }
Avi
  • 53
  • 3

2 Answers2

1

The fixed/cover part is invalid, try the following:

background: url("../img/showcase.jpg") no-repeat top center fixed;

the possible options for the background property can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/background

MaartenDev
  • 5,631
  • 5
  • 21
  • 33
0

You should use only one fixed or cover background: url("../img/showcase.jpg") no-repeat top center fixed;