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
[solved] another css background picture on 8 pages
[solved] another css background picture on 8 pages
Last edited by mev on Wed Feb 20, 2008 12:25 am, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: another css background picture on 8 pages
in your page template try something like this:
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.
Code: Select all
<div id="thedivthatholdsthebackgroundcolor" style="background: url(uploads/images/{$page_alias}.jpg)">
...
</div>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: another css background picture on 8 pages
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:
How wonderfull, 1000 thanks Calquy
willemijn
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
Hi mev, glad you have this sorted.
Please update the topic to [solved] thanks.
Please update the topic to [solved] thanks.