Just using HTML and CSS, I would give each page an id (body id="index">, body id="contactus">) and so on, so that I could change the CSS if necesary for individual pages.
I have a #sidebar that contains a #picturediv. I need to put a different image on each page as a background to the text in the #picturediv.
How is this sort of thing done in CMSMS?
Thanks.
[Solved]How to add a bg img to a div, different on each page
[Solved]How to add a bg img to a div, different on each page
Last edited by jasnick on Sat Feb 26, 2011 12:50 am, edited 1 time in total.
Re: How to add a bg img to a div, different on each page
In your page template do something like:
In your stylesheet do then:
Code: Select all
</__body class="{page_alias}>
Code: Select all
body.home #picturediv {
some: style;
}
body.contact-us #picturediv {
some: otherstyle;
}
Re: How to add a bg img to a div, different on each page
OK - thank you very much - I will do that!
Re: How to add a bg img to a div, different on each page
just got reminded by Ronny on IRC that once again i wrote something stupid
So if you do use this dont forget $ before page_alias
So if you do use this dont forget $ before page_alias
Code: Select all
</__body class="{$page_alias}>
Re: How to add a bg img to a div, different on each page
LOL - Thanks again! I'll mark this Solved now and post back if I have any difficulties.