PDA

View Full Version : CSS - help please


lavanay
08-03-2006, 12:12 PM
I am making three pages for a friend, but he wants different coloured backgrounds on each page, is this possible using just one style sheet? I am just wondering how I could give the pages seperate ID tags to referer to them in css or is this not possible? Will I have to have a seperate style sheet for each page?

Many Thanks

SweetCharity
08-08-2006, 01:15 AM
It sounds like you'll need a separate style sheet for each page. But be warned: I only know the bare basics of CSS. Just because I can't get it to do different things, doesn't mean it can't be done.

QuietLunatic
09-05-2006, 01:56 PM
Each page is going to need its own coding anyway; it won't be hard to change the color coding in the CSS on each page. Or am I misunderstanding the "3 pages" concept?

Nicole2112
09-11-2006, 07:58 PM
Is it possible to put an ID attribute in the BODY tag, such that your stylesheet would look like this--

BODY#1 { background-color:fff }
BODY#2 { background-color:ffe }
BODY#3 { background-color: fef }

And then...

< BODY ID=1 >

etc.

I haven't tried it, so I don't know if it would work. If not, you could definitely do it with DIVs. DIV#1 {background-color:fff} etc. and just have one big DIV inside each BODY tag:

< BODY >
< DIV ID=1 >
...page content...
</ DIV >
</ BODY >

Real brute force solution, I know. Sorry.

QuietLunatic
09-13-2006, 02:04 PM
Sometimes brute force is the way to start and you can learn to finesse later on. :)