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;
}
to get an image -
using the ../images/ or images/ does not show an image.
Joomla 4.2.3
for an example ... using the full url.
see here: https://tdocplus.co.uk/dionnevallantyne/
Richard
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
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');
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-10-12 11:46:40 |
Closed_By | ⇒ | richard67 |
Closing as not a bug. For explanations see previous comments by @brianteeman and @ReLater (thanks guys).
Hi all
Thanks for the pathing info.
Richard
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')
Please use the forum for support.
Can be closed - not a bug