My background image not showing

My background image not showing
0

#1

I am struggling to get a background image to show. below is the code. Also I have already used a background image with the same path and it worked totally :confused: Any advice please…

  .pimg1{
    position: relative;
    opacity: 0.70;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }
  .pimg1{
     background:url('../img/computer.jpeg');
 }

#2

Would need to see your html also.


#3

Thanks

<div class="pimg1">
      <div class="ptext">
      <span class="border">
        @MEDIA
        </span>
      </div>
    </div>

#4

@carlito76 I see no reason why it should not work if the image exists in the location you specified. Check your console (Ctrl+Shft+J in Chrome) to see if you get a 404 error message, which would indicate you are not correctly referencing the image location.


#5

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#6

I never knew that. yes i will check, Thanks