Get stylesheet
Permalink
Hey,
just wondering if anyone else is having this problem, i use the code
getStyleSheet('your_stylesheet.css')?>
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,
code:
url('images/something.png')
when i look at the source its
url('http://site.com/index.php/tools/css/theme/'images/something.png'')
they 2 ' are not being stripped so no images show.
Anyone else? (SVN build from a few weeks ago)
just wondering if anyone else is having this problem, i use the code
getStyleSheet('your_stylesheet.css')?>
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,
code:
url('images/something.png')
when i look at the source its
url('http://site.com/index.php/tools/css/theme/'images/something.png'')
they 2 ' are not being stripped so no images show.
Anyone else? (SVN build from a few weeks ago)
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.
yea i know that, but getthemepath(); works fine, getstylesheet adds 2 extra ' around the path specified in the CSS files breaking the paths
Any resolution to this? I was exploring the customize options for css and switched to the getStyleSheet function and am having the same problem.
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.
I'm not at my computer, I can not verify what I say. But there was a solution.
I faced with this issue too. I simply don't use apostrophes in css and it works :-)
I.e.
Instead of
.someclass {
background: url('somefile.jpg');
}
I use
.someclass {
background: url(somefile.jpg);
}
I.e.
Instead of
.someclass {
background: url('somefile.jpg');
}
I use
.someclass {
background: url(somefile.jpg);
}