CSS background colour
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
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 posted this at 19:35 — 26th March 2005.
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
james.thornton posted this at 16:25 — 27th March 2005.
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.
chud_wallice posted this at 00:02 — 28th March 2005.
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.