Background Image

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply

Background Image

Post by compu73rg33k » Thu Apr 28, 2005 11:50 pm

I want to use a background image for the main background. The code I put in the css was

Code: Select all

background: url(mainbg.gif) repeat; 
For some reason it doesn't display the background. The mainbg.gif file is in the /templates/new_theme/ folder.

User avatar
Posts: 178
Joined: Mon Jan 10, 2005 7:43 pm
Location: Herne, Germany

Post by Oliver » Fri Apr 29, 2005 12:06 am

Please try it with

Code: Select all

    background: url("templates/new_theme/mainbg.gif") #e1e1e1 repeat-y center top;

- Oliver


Post by nine-times » Fri Apr 29, 2005 12:51 am

Instead, you might want to use:

Code: Select all


Serendipity will recognize what directory the current template is in and automatically plug it in for the variable "{TEMPLATE_PATH}".

That way, if you end up wanting to rename your directory from "new_theme" to "old_theme", you won't have to go back and re-edit your CSS file.



Post by compu73rg33k » Fri Apr 29, 2005 5:12 am

It appears that the color was taking precidence over the image for some reason. The code I used was

Code: Select all

background: url("{TEMPLATE_PATH}/mainbg.gif") transparent repeat center top;

Post Reply