I'm guessing this isn't possible, I'm writing a site where I want index.htm to have a black background, every other page will have the same background apart from this.
I thought it would just be a case of defining:
body.index (background-color: #000000;}
then using the class index....but nope! I've also tried .index etc...
Is there a way around this without a separate style sheet?
Thanks!use <body id="idname">
and
#idname {background: #000}as you won't have many bodies elements in your document, you may as well select it as:
body{
background-color: #000;
}i think he wants to do
<body id="index">
body{
background-color: #somecolor; /*all pages except index*/
}
#index{
background-color: #000;
}I thought screaming_banjo was a she the last time I noticed but anyway just use the id method.You can also define the style inline <body style="background-color:chartreuse"> or whatever floats yer boat
I thought it would just be a case of defining:
body.index (background-color: #000000;}
then using the class index....but nope! I've also tried .index etc...
Is there a way around this without a separate style sheet?
Thanks!use <body id="idname">
and
#idname {background: #000}as you won't have many bodies elements in your document, you may as well select it as:
body{
background-color: #000;
}i think he wants to do
<body id="index">
body{
background-color: #somecolor; /*all pages except index*/
}
#index{
background-color: #000;
}I thought screaming_banjo was a she the last time I noticed but anyway just use the id method.You can also define the style inline <body style="background-color:chartreuse"> or whatever floats yer boat