How to attach images to my template?

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
jshotz
New Member
New Member
Posts: 2
Joined: Wed Mar 25, 2009 7:44 pm

How to attach images to my template?

Post by jshotz »

I got this in my css

background:url(picture.jpg);

how do I know where to upload my background image so the stylesheets relates to it properly?
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: How to attach images to my template?

Post by CWebguy »

You can upload anywhere you want, just make sure to use an absolute path

that is http://www.yoursite.com/img/image2.jpg

or if you are using it relative to where the stylesheet is it needs to be in the same folder as the stylesheet (as in the example you have).
CMSMS Made
jshotz
New Member
New Member
Posts: 2
Joined: Wed Mar 25, 2009 7:44 pm

Re: How to attach images to my template?

Post by jshotz »

Thanks!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How to attach images to my template?

Post by Dr.CSS »

Uh if you have the {metadata} tag in your template then in the css you can use url(uploads/images/image.jpg) or whatever your path is and you won't need an absolute path...

Me, I use a folder in uploads to hold all the images used in the template design like uploads/templatename so path would be url(uploads/templatefolder/image.jpg) so they aren't available to the editor in pages, these would be in uploads/images, please don't use root/images as this is mostly for the admin images not like a flat file site where you would use this type of structure...
Post Reply

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