-1

I've divided my web page to left and right container(it's working fine). I made new class in div called "user-cover-container" and it only needs to put cover image on the top left side of the page.

Image is in the same folder as css and HTML file. HTML and css files are merged correctly.

.user-cover-container{
      height: 200px;
      width: 100px;
      background-image: url("bck.jpg");
      background-size: cover;
  }
<div class=”user-cover-container”> </div>
Mark Baijens
  • 13,028
  • 11
  • 47
  • 73
domagoj101
  • 25
  • 4
  • 3
    The quotes you are using in `
    ` are wrong. Make it either single or double quotes or without any
    – AdityaSrivast Jul 03 '19 at 14:26
  • you copy pasted some code from somewhere, and you re not using the normal quotes. check https://theasciicode.com.ar/ascii-printable-characters/double-quotes-quotation-mark-speech-marks-ascii-code-34.html (34 and 39) – George Katsanos Jul 03 '19 at 21:43

2 Answers2

2

Please check the inverted commas for class attribute in HTML. Change them to - " "

.user-cover-container{
      height: 200px;
      width: 100px;
      background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTlhiyjToS4vgqPDf_ip_MdI8B7RKbfOlCCLsb9qH8d1PPN-rj5TA");
      background-size: cover;
  }
<div class="user-cover-container"> </div>
Sonia
  • 1,909
  • 1
  • 11
  • 13
0

you have missed the "". add this to your code.

<div class="user-cover-container">test </div>

.user-cover-container{
      height: 200px;
      width: 100px;
      background-image: url("https://www.w3schools.com/w3css/img_forest.jpg");
      background-size: cover;
      color: white;
  }
<div class="user-cover-container">test </div>
Irin
  • 1,274
  • 1
  • 8
  • 9