[solved] another css background picture on 8 pages

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
mev
Power Poster
Power Poster
Posts: 371
Joined: Wed Apr 25, 2007 5:00 pm

[solved] another css background picture on 8 pages

Post 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
Last edited by mev on Wed Feb 20, 2008 12:25 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: another css background picture on 8 pages

Post 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.
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.
mev
Power Poster
Power Poster
Posts: 371
Joined: Wed Apr 25, 2007 5:00 pm

Re: another css background picture on 8 pages

Post 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
cubix
Power Poster
Power Poster
Posts: 314
Joined: Mon Jul 09, 2007 10:00 am

Re: another css background picture on 8 pages

Post by cubix »

Hi mev, glad you have this sorted.

Please update the topic to [solved] thanks.
Post Reply

Return to “Layout and Design (CSS & HTML)”