|
Posted by nice.guy.nige on 10/25/98 11:43
While the city slept, BK (jerem43@att.net) feverishly typed...
> I am trying to get my webpage fully dependant on the CSS for layout. I
> have several pages on my site. Here is the layout:
[...]
> 3. The backgrounds are all laid out with an inline style in the head
> of each page like this:
>
> <style type="text/css">
> <!--
> body { background-image: url("backgrounds/greengrey.jpg")}
> -->
> </style>
Get rid of this... keep it in your css file.
> My question is this, is it permissable to define a class in the css
> for the individual page groupings.
>
[...]
> body.red { background-image: url("backgrounds/redrey.jpg")}
[...]
Yes. You can define a background for each section of your site as such. In
the HTML for each such page, use <body class="red"> (etc)
I would, however, not recommend using terms such as "red", "green", "blue"
to define your pages. What happens when you decide that the contact page
should be yellow instead of orange? And the Links page should be blue
instead of yellow??? You are entering a "World Of Pain[tm]" by defining your
css code by presentation. Instead, define them by section as follows;
body.links {
background-image: url("backgrounds/bluegrey.jpg");
}
body.contact {
background-image: url("backgrounds/yellowgrey.jpg");
}
Hope that helps,
Nige
--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"
Navigation:
[Reply to this message]
|