Page 1 of 1

Background image in banner.

Posted: Thu Jun 10, 2004 4:11 am
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)?

Posted: Thu Jun 10, 2004 5:27 pm
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;

Posted: Thu Jun 10, 2004 5:31 pm
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???

Posted: Thu Jun 10, 2004 5:45 pm
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.