Referencing an image from a gallery in CSS
Hi,
I've uploaded an image to an image gallery in Sitefinity 4. I want to use it as a background-image of the body in the page and reference the image, like so:
background-image: url('metal_texture_7_by_wojtar_stock.jpg);
However, the background-image does not appear on the page. How can I reference the image successfully?
Isn't there an embed link somewhere you can copy\paste in the gallery which would work? I know the Documents library has that...
Hi Steve,
You need to write the absolute path of the image. You can check it as you go to Images module and click on "Embed this image" link of the particular image. From Link field you can copy the absolute path.
Greetings,
Katia
the Telerik team
This is the approach I used, however, this does not seem to be a good solution for those of us using site-sync. Could you tell me how to solve this under a staging / production scenario?
Hello Eric,
Can you please try to use only the relative part of the image in your code, e.g.
/images/default-source/default-album/my-image.jpg?sfvrsn=2