CSS background colour

They have: 42 posts

Joined: Jan 2005

Hi

How do I have a page where the background is determined in a a CSS file? I'm getting familiar with CSS but can't work this one out!

Harvey

dk01's picture

He has: 516 posts

Joined: Mar 2002

Put this in the of your document:

Then in mystyle.css you need to put this:
body { background: #ffcc00; }

You can edit #ffcc00 to match whatever color you want.

-dk

They have: 42 posts

Joined: Jan 2005

Yes, but I need different backgrounds on different pages. Hmm.

Oh well, I'll just do them individually.

They have: 1 posts

Joined: Mar 2005

or
body.style1 {background:#fff}
body.style2 {background:#ffc}
body.style3 {background:#fcf}
in the style sheet
and for each page add a class attribute to the body tag
like

HTH

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.