CSS background images in a module

Topics: Writing modules
Oct 18, 2012 at 2:56 PM

I'm trying to write a custom module, which uses a 3rd party JS/CSS control. Everything is fine, except the images. The control has a CSS file with image URLs expecting the image folder to be under the CSS one. If I put the control in a theme, it works fine.

Oct 18, 2012 at 4:43 PM

So why don't you put the image folder under the css one?

Oct 22, 2012 at 3:33 PM

The URLs for the images become something like "Themes/TheThemeMachine/Styles/images/cal16ng.gif". When the images are in my module that URL is 404. Moving the images to the theme project solves the problem, but it's not very clear. So I'm wondering if I'm doing something wrong, or should I open a feature request.

Oct 22, 2012 at 4:30 PM

If your stylesheet is being served from your module, and you are using relative paths from your stylesheet to the images, it will work. I'm staring at it working right now.

Oct 25, 2012 at 9:44 AM

OK, thanks Bertrand, it must be a problem with my setup than.