Im trying to create a five page site for class and i dont want a certain Home page graphic to be on the About me page...just the about me text, but when i deleted the background image it deletes it from the Home page ugggh. some help please....

1 answer

3
points

give the body and id or a class and use that to identify the css just for that page.

e.g.

if you have

div.page{background: #FFF url('../images/bg-body.png') repeat-x top left;}

on your home page then you'd change that for the about us page, by setting body tag to id=about:

<body id="about">

and writing this in your CSS:

#about div.page{background: #FFF url('../images/different-image.png') repeat-x top left;}

which means: apply this style to divs with class page only when they are in a container that has the id about.

Answered about 7 years ago by Tony Crockford