[SOLVED] Different background color for page (content) and related menu entry

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
eh
Forum Members
Forum Members
Posts: 29
Joined: Sun Oct 07, 2007 1:19 pm

[SOLVED] Different background color for page (content) and related menu entry

Post by eh »

Hi
I'd like to have different background colors for specific pages, although most of the pages have the same bgcolor. Also a bgcolor, let's say red, should be given to several pages which aren't related to each other, i.e. they can be placed anywhere in the page hierarchy. Also the menu entries linking to those pages with different colors should have the same background color to give users a visual hint.

There are solutions to this I found when searching the forum, for example:

http://forum.cmsmadesimple.org/index.php/topic,19002.msg93720.html#msg93720

or somehow related also here:

http://forum.cmsmadesimple.org/index.php/topic,15318.msg86548.html#msg86548
http://forum.cmsmadesimple.org/index.php/topic,11689.0.html

My questions now are:

-----
1.
The first solution mentioned above uses the page alias. But since a unique page alias can be given to one page only (otherwise you get the message "Alias has already been used on another page." I'd have to create stylesheets with same formatting for as many pages as there are in the website with same different bgcolor - which is an unforeseeable number and furthermore would have me add a copy of an existing stylesheet whenever an author adds as new page that should have a different although already defined bgcolor. Is there another solution than using the page alias - something like attaching a CSS class selector in the content edit window for the body/pagewrapper tag?
-----
2.
Have no idea how to sync menu item bgcolor with page bgcolor - any ideas?
-----

Maybe I missed the essence of the posts referred to above? I'd be glad if somebody could help me in understanding them better

- or -

even show me other ways to solve my problem since I guess that I'm not the only one wanting to do this.

Thanx!
Ernst


PS: I'm using CMS Made Simple 1.2.3 with CGSimpleSmarty module installed.

[SOLVED]
Marked as solved to have it out the way. Using smarty variables helps a lot to bring varying formatting to a website.
Last edited by eh on Wed Apr 08, 2009 3:06 pm, edited 1 time in total.
Post Reply

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