[SOLVED ]Stylesheet Issue

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
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

[SOLVED ]Stylesheet Issue

Post by CapereSpiritum »

Hi, I'm running CMSMS 1.10.2, php 5, mySQL 5

I'm in the process of converting a static site to CMSMS.

All the static pages have a body tag like this </__body class=home> which then leads to a background image that varies according to BODY.home #headerimage { with the .home varying according to the page and setting a different header BG image.

If I'm using a modified CMSMS template, can anyone suggest how to modify the style to do the same job without having to create 14 different templates that are otherwise the same?

Many thanks in advance.
Last edited by CapereSpiritum on Mon Feb 06, 2012 2:31 pm, edited 1 time in total.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: Stylesheet Issue

Post by KO »

You can have:
</__body class="{$page_alias}">

This way all the pages have page alias printed which is unique. Just check that alias is for that page is what you want.
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: Stylesheet Issue

Post by CapereSpiritum »

Hi KO

That was quick... Brilliant.

Just to re-cap, let's assume the page is about Bass and the alias is 'bass', change the body tag as above and then the style to be BODY.bass #headerimage {

Seems pretty clear, just double checking :)

Many thanks...
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: Stylesheet Issue

Post by KO »

Correct ... or just simply .bass #headerimage {
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: Stylesheet Issue

Post by CapereSpiritum »

Fantastic, many thanks.

Easy when you know how... ;)

Cheers...
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Stylesheet Issue

Post by M@rtijn »

So this one is solved?

Would you be so kind to add [solved] in front of the title of the first post, as per http://forum.cmsmadesimple.org/viewtopic.php?f=3&t=8692
Make your community a better place!
Post Reply

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