Page 1 of 1

Background image not showing [solved]

Posted: Tue Feb 08, 2011 12:00 am
by geediu
Hi,

I've created a template from my graphic designer who has given me the HTM and CSS and the images. When I view the page I created with the template, the background image doesn't show but when I hit the URL of the image directly it displays no problem and I am hoping someone could tell me why.

This is how the CSS was done:

.blok_header {
background: url("images/hdrbg.gif") repeat-x scroll center top transparent;
margin: 0;
padding: 0;
}

Thanks in advance for your help.

Geediu

Re: Background image not showing

Posted: Tue Feb 08, 2011 12:12 am
by Dr.CSS
You are using the {cms_stylesheet} tag so you need either url([[root_url]]/uploads/bla/bla) or url(/uploads/bla/bla) and no need for the " " note the / in them...

Re: Background image not showing [solved]

Posted: Tue Feb 08, 2011 12:20 am
by geediu
Thanks for the quick response.

Works now when I use:

.blok_header { margin:0; padding:0; background:url([[root_url]]/images/hdrbg.gif) top repeat-x; }

but not sure why only needed for this one, whereas I only have url(/images/blahblah.gif) for referencing other images in the CSS.

Re: Background image not showing [solved]

Posted: Tue Feb 08, 2011 12:30 am
by Dr.CSS
If you clear your browser cache you most likely see that the image under the slider doesn't show, may I suggest you put your images in uploads and not in root/images folder like a flat file site, I put them in a uploads/nameoftemplate folder in uploads if they are going to be used in the template and uploads/images if used in page content or album/gallery...