CSS background image src URL .../tmp/cache/...

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
sherlock
Forum Members
Forum Members
Posts: 15
Joined: Thu Aug 12, 2010 6:08 am

CSS background image src URL .../tmp/cache/...

Post by sherlock »

Hi everyone

I am just buildingup my own template and I face a minor problem which I couldn't figure out how to solve.
So, basically in my CSS file there are few background images and the source for these images is set correctly to the right source (ex url(uploads/images/site/bg.gif) repeat-x;).
When I load the page in the browser, the background image does not show up and the source in CSS file looks like this url("http://localhost/cmsmadesimple/tmp/cach ... ite/bg.gif)

This is only in cases when I use images in CSS. Images used in the HTML templates are OK.

I would really appreciate someone helping me out with this problem. Why does the image source URL point to the tmp directory instead of the one I actually specified in my CSS file? What I am missing here?

Thank you
sherlock
uniqu3

Re: CSS background image src URL .../tmp/cache/...

Post by uniqu3 »

Your problem could be version 1.8 or 1.8.1 where stylesheet is cached and placed in tmp folder.
Use [[root_url]]/uploads/images/yourimage.gif
sherlock
Forum Members
Forum Members
Posts: 15
Joined: Thu Aug 12, 2010 6:08 am

Re: CSS background image src URL .../tmp/cache/...

Post by sherlock »

thank you uniqu3
yes, indeed I use version 1.8 and your solution just solved mu problem :)
I really appreciate your support

lot of thanks
User avatar
micahgodbolt
Forum Members
Forum Members
Posts: 149
Joined: Thu Jul 29, 2010 11:09 pm
Location: Portland, OR

Re: CSS background image src URL .../tmp/cache/...

Post by micahgodbolt »

i had the same issue, and just did /../../images/file.jpg - this does the same thing of getting you back to the root folder from where that css file is stored.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: CSS background image src URL .../tmp/cache/...

Post by Rolf »

sherlock wrote: thank you uniqu3
yes, indeed I use version 1.8 and your solution just solved mu problem :)
Sherlock, would you please be so kind and put [Solved] in the title of the first post?
You can use the 'modify' button for this.

Thanks, Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CSS background image src URL .../tmp/cache/...

Post by Dr.CSS »

With the new cms_stylesheet tag you can also use (/uploads/bla bla) instead of [[root_url]]/uploads...
dlen
Forum Members
Forum Members
Posts: 67
Joined: Fri Apr 09, 2010 11:32 pm

Re: CSS background image src URL .../tmp/cache/...

Post by dlen »

This forum is terrific. One shot one hit. ;D
User avatar
micahgodbolt
Forum Members
Forum Members
Posts: 149
Joined: Thu Jul 29, 2010 11:09 pm
Location: Portland, OR

Re: CSS background image src URL .../tmp/cache/...

Post by micahgodbolt »

Can you post a link to the site you are working on? One thing you want to make sure of is that your stylesheet call is {cms_stylesheet} and not the older {stylesheet}.
ladyr0gue
Forum Members
Forum Members
Posts: 91
Joined: Fri Feb 17, 2012 4:25 pm

Re: CSS background image src URL .../tmp/cache/...

Post by ladyr0gue »

Just to be sure [[root_url]]/uploads/images/image.jpg will be fine to transfer to the live server won't it? and out of interest once the website is installed on a live server would I be able to neglect the [[root_url]]/ command or as I seem to be finding out does the {cms_stylesheet} tag always require the full path to an image?
Post Reply

Return to “Layout and Design (CSS & HTML)”