Page 1 of 1

two images in one css style

Posted: Fri Mar 28, 2008 8:42 am
by edzillion
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


I am trying to edit a forum template to look like the rest of the site. The template is pretty spot on but I need to change the way the background is displayed.

The template designer basically has the forum background set in the body tag style (line 5,6):

Code: Select all

body {
    /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
    font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
    color: #323D4F;
        background-color: #666666;
    background-image: url('./images/background.gif'); background-repeat:repeat-y; background-position: top center; 
    font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */
    margin: 0;
}
As you can see he has a fixed with design, and uses the image 'background.gif' to show this central column of the forum.
I want a horizontal gradient to match the rest of the site:

Code: Select all

 
background-image: url(./images/bodyground-gradient.jpg);
background-repeat: repeat-x;
 
but if I do this I lose the central column. Is there a way to have two images set in one style, like background and foreground or something? Or perhaps just a block of colour and not an image at all? The other option is going through the template and trying to add another div (I havent a clue where to start. phpbb template design is a pretty arcane art, it would seem)

...

Any ideas?
Ed


~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.

Re: two images in one css style

Posted: Fri Mar 28, 2008 10:00 am
by matthijs
You cannot set multiple background images on the same elements. maybe in a few years when browser supports them. For now, you have to do as you thought yourself: use another element (div for example).

Re: two images in one css style

Posted: Mon Mar 31, 2008 4:47 am
by JayBird
As said, it is not possible. You would need to alter the template to facilitate the change you require.

Safari does support multiple backgrounds though... YAY for Safari :drunk: