Get stylesheet


just wondering if anyone else is having this problem, i use the code


to get a style sheet in a theme,

if the style sheet has images in the CSS they are not parsed correctly. if i use getThemePath they work,


when i look at the source its


they 2 ' are not being stripped so no images show.

Anyone else? (SVN build from a few weeks ago)

View Replies: View Best Answer
Filofox replied on at Permalink Reply
Late reply, but for future reference: URLs in CSS stylesheets are relative to the stylesheet file itself. So if the stylesheet is in the theme folder, unless you use a URL relative to the root folder -- e.g. url(/img/image.png) -- then the image's path will be generated relative to the style sheet's own path.
Mnkras replied on at Permalink Reply
yea i know that, but getthemepath(); works fine, getstylesheet adds 2 extra ' around the path specified in the CSS files breaking the paths
Arismoon replied on at Permalink Reply
Any resolution to this? I was exploring the customize options for css and switched to the getStyleSheet function and am having the same problem.
sebastienj replied on at Permalink Reply
I had this problem. If I remember correctly, I had to put the full url in CSS (with http).
I'm not at my computer, I can not verify what I say. But there was a solution.
smartwebprojects replied on at Permalink Best Answer Reply
I faced with this issue too. I simply don't use apostrophes in css and it works :-)


Instead of

.someclass {
background: url('somefile.jpg');

I use

.someclass {
background: url(somefile.jpg);