0

I'm currently making a website in PHP. When developing it I use xampp (localhost), and the pictures are visible.

<div data-bs-parallax-bg="true" style="height:500px;background-image:url(&quot;assets/img/mypicture.jpg&quot;);background-position:center;background-size:cover;">

When I wanted to upload to web server the pictures are invisible.

I tried these options but still not working.

style="height:500px;background-image:url('assets/img/mypicture.jpg');

style="height:500px;background-image:url('./assets/img/mypicture.jpg');

style="height:500px;background-image:url('../assets/img/mypicture.jpg');

style="height:500px;background-image:url('https:/example.com/assets/img/mypicture.jpg');

and the same with only background:url();

Thanks in advance!

Gabriel
  • 1,401
  • 13
  • 21

1 Answers1

0

Remove the quotes (single, double).

background-image: url(assets/img/mypicture.jpg);

Also, be careful when using relative paths here. Check this question too:

Using relative URL in CSS file, what location is it relative to?

Gabriel
  • 1,401
  • 13
  • 21