Page 1 of 1

[solved] another css background picture on 8 pages

Posted: Tue Feb 19, 2008 10:10 pm
by mev
Hi all,
My client wishes to have 8 different background pictures on each of his 8 pages. The backgroundpic is defined in the css, which ofcourse isĀ  attached to the main template (1)
Do I have to make 8 different stylesheets (in each one another backgr. picture defined) to attach to 8 different templates ?
Or would there be a much easier way?

Thanks,
willemijn

Re: another css background picture on 8 pages

Posted: Tue Feb 19, 2008 11:02 pm
by calguy1000
in your page template try something like this:

Code: Select all

<div id="thedivthatholdsthebackgroundcolor" style="background: url(uploads/images/{$page_alias}.jpg)">
...
</div>
then remove the background tag from the appropriate div in the css and create image files in the appropriate directory that match your page aliases.

Re: another css background picture on 8 pages

Posted: Tue Feb 19, 2008 11:29 pm
by mev
Yeahhh that works!
Even with some extra's like the position of the background picture (center left no-repeat ). I tried several ways to add that too and in front of your code-tip on the inline style it worked fine,
so it became:

Code: Select all

<div id="container" style="background: center left no-repeat url(uploads/images/{$page_alias}.jpg)"> 


How wonderfull, 1000 thanks Calquy

willemijn

Re: another css background picture on 8 pages

Posted: Tue Feb 19, 2008 11:55 pm
by cubix
Hi mev, glad you have this sorted.

Please update the topic to [solved] thanks.