Help with background images

I’m sure this is something quite simple, but I cannot resolve the issue without help.

I have these entries in an HTML template and a CSS file that we are converting to C5:

HTML:
style=“background-image:url(‘uploads/parallax_02.jpg’);”>

TRIED THIS:

<?= $view->getThemePath() ?>/assets/uploads/

CSS:
background: url(images/bg.png)
TRIED THIS:

<?= $view->getThemePath() ?>/assets/images/

Nothing works, i.e. cannot load the images.

What am I missing?

1 Like

It is likely that your paths are just incorrect - it will depend on how your theme directory is structured…

=======

Firstly - out of interest - What is:

<?= $view->getThemePath() ?>

outputting for you ?

=======

Secondly - Can you confirm what the structure of your theme directory is - i.e. whereabouts the CSS and these images are kept

Are the images kept here ?
themename/assets/images/parallax_02.jpg

And the CSS here ?
themename/css/stylesheet.css

1 Like