Proper way to link to images from css?
I'm attempting to create a custom theme in sitefinity 4. Right now I'm working with the layout.css file in my new theme but I need to add references to images stored in the images folder. Right now I have to use a very long url to get to the images, while I've seen in other theme's css files some type of folder referencing that uses . (period) instead of / .
I have to use : /sitefinity4/Sitefinity/WebsiteTemplates/MaxQ/App_Themes/DefaultTheme/images/bg.jpg
while I see this used elsewhere :
url(<% = WebResource("Telerik.Sitefinity.Resources.Themes.Basic.Images.sfPublicContent.gif") %>)
What's going on there? Can I use that type of referencing? I've read through the designers guide and it tells me everything except how to actually design and implement a theme... although it was helpful when I was setting up the new theme.
What is the preferred way for defaultheme/global/layout.css or reference images stored in defaulttheme/images ?
Hello Chris,
The stylesheet is located in the theme folder where is Images folder, so you can reference an image as shown below
background:url(../Images/bg.gif);
Kind regards,
Ivan Dimitrov
the Telerik team
Ivan,
How I can refer to image in theme from template?
For example, I've added Content Block and need to add <img> tag.
Thanks!
P.S.: Seems, I found answer here: www.sitefinity.com/.../images