0

Howdy,

NewB to CSS and have a background image set to show up on my html pages, and so it does...

body {
font-family: "Trebuchet MS", sans-serif;
background: #bbb url(../imageshtml/page_background.jpg);
margin: 0;
padding: 0;
}

This currently happens to all of my html pages, BUT I don't want it happen to one of them. I want one of them to have a different background image but I don't know how to give this one html page a different background image or make it an exception.


I tried adding a <div id="privacy"> </div> to the exception html page, both inside and outside of the <body> </body> tag.

Then in the CSS file I had this...

/* ===== Privacy Policy ===== */

div#privacy {
background: none;
}

OR

div#privacy {
background: url(../imageshtml/page_background2.jpg);
}


Nothing I do seems to be working.

Thanks for any help you can give!

k

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by kaveman
0

Why don't you just give the body an id? Only call the id on the pages that you want the background.

#background {
background: #bbb url(../imageshtml/page_background.jpg);
}
0

Hi MagicMedia,

Much thanks for your reply.

Your response makes sense in theory :) what would that look like?

html
<body id="background">

css
body#background {
<!--add background code goes here-->
}

Much Thanks for your help!

k

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.