No Code Attached Yet
avatar rgtr
rgtr
12 Oct 2022

Steps to reproduce the issue

in the user css enter something like:
/* setup background image /
.grid_item_bg {
/
this works /
background: url('http://127.0.0.1/as_31011_a/images/banners/logo8-125.jpg');
/
this does NOT work /
/
background: url('../images/banners/logo8-125.jpg'); /
/
this does NOT work either /
/
background: url('images/banners/logo8-125.jpg'); */
background-repeat:no-repeat;
}

Expected result

to get an image -

Actual result

using the ../images/ or images/ does not show an image.

System information (as much as possible)

Joomla 4.2.3

Additional comments

for an example ... using the full url.
see here: https://tdocplus.co.uk/dionnevallantyne/

Richard

avatar rgtr rgtr - open - 12 Oct 2022
avatar rgtr rgtr - change - 12 Oct 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Oct 2022
avatar brianteeman
brianteeman - comment - 12 Oct 2022

No it doesnt require the full path. It just requires the correct path ;)

The path to the image is the path from the location of the css file that is referencing it. So in your specific case it would be
url('../../../../../images/banners/bebe_01_s.jpg')

image

Please use the forum for support.

Can be closed - not a bug

avatar ReLater
ReLater - comment - 12 Oct 2022

background: url('../images/banners/logo8-125.jpg');

It depends on where your user.css is located.

Example 1: In JOOMLAROOT/templates/MYTEMPLATE/css/user.css

background: url('../../../images/banners/logo8-125.jpg');

Example 2: In JOOMLAROOT/media/templates/site/MYTEMPLATE/css/user.css

background: url('../../../../../images/banners/logo8-125.jpg');

avatar richard67 richard67 - change - 12 Oct 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-10-12 11:46:40
Closed_By richard67
avatar richard67 richard67 - close - 12 Oct 2022
avatar richard67
richard67 - comment - 12 Oct 2022

Closing as not a bug. For explanations see previous comments by @brianteeman and @ReLater (thanks guys).

avatar rgtr
rgtr - comment - 13 Oct 2022

Hi all
Thanks for the pathing info.
Richard

Add a Comment

Login with GitHub to post a comment