Background image in banner.

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Hug_It
Regular
Posts: 8
Joined: Wed Jun 09, 2004 10:59 pm

Background image in banner.

Post by Hug_It »

I've been trying my hand at a custom style but I'm not able to use a background image in the banner area. I've placed an image in my /img directory of my new style called background.png but it won't display. Here's the section of my style.css:

Code: Select all

#serendipity_banner {
    border-left: 1px solid #000000;
    border-right: 1px solid #000000;
    margin: auto;
    width: 95%;
    height: 201px;
    background-image: url({TEMPLATE_PATH}img/background.png) no-repeat;
}
I've put smaller images in the directory and it's worked, is my image too big (1024x201)?
Glyphon
Regular
Posts: 5
Joined: Mon May 03, 2004 6:22 am

Post by Glyphon »

i think the problem is with the no-repeat.

the way you have it used is not the correct implimentation of it.
here's how it should be:

Code: Select all

    height: 201px;
    background-image: url({TEMPLATE_PATH}img/background.png);
    background-repeat:no-repeat;
or

Code: Select all

    height: 201px;
    background: url({TEMPLATE_PATH}img/background.png) no-repeat;
Hug_It
Regular
Posts: 8
Joined: Wed Jun 09, 2004 10:59 pm

Post by Hug_It »

I had it set up before without the no-repeat option but I will give that a try when I get a chance. For some reason I'm really thinking it has to do with that image because if I don't change the code and just replace the image with another one it works fine. Permissions on the image???
Glyphon
Regular
Posts: 5
Joined: Mon May 03, 2004 6:22 am

Post by Glyphon »

hmm...it works for me that way, and the image size doesn't matter.

for the file to have the same permissions as the other pics in the directory use...

Code: Select all

sudo chmod 755 filename.ext
dunno why they have to be executible, but thats how the other files are set. that gives it rwxr-xr-x permisions.
Post Reply