Hi--
I'm working my way through the book, Beginning CSS Web Development by
Simon Collison. I ran into a problem on pages 17-18 (Chapter 2), I
have copied and put in three rules re IDs and the <ptag.
The first and second paragraphs are red, and the third paragraph
should be
dark gray. My problem is that all three paragraphs are red.
Here are the three CSS rules:
p {
color: #F00;
}
/* Define highlighted text */
-----------------------------------------------------------------
#highlight {
color: #F00;
}
/* Define default text */
-----------------------------------------------------------------
#default {
color #333;
}
Can you tell me what I'm doing wrong which causes the third paragraph
to be
red instead of dark gray?
I wrote to the author, and he told me that there had been a mistake in
the example (not enough specificity), and that the CSS rule should
read:
/* Make text red only for paragraphs within the box class */
#container .box p {
color: #F00;
}
I have tried that, and it still doesn't work for me. Can you tell me
what I'm doing wrong, and how to correct it?
Thank you.
I'm working my way through the book, Beginning CSS Web Development by
Simon Collison. I ran into a problem on pages 17-18 (Chapter 2), I
have copied and put in three rules re IDs and the <ptag.
The first and second paragraphs are red, and the third paragraph
should be
dark gray. My problem is that all three paragraphs are red.
Here are the three CSS rules:
p {
color: #F00;
}
/* Define highlighted text */
-----------------------------------------------------------------
#highlight {
color: #F00;
}
/* Define default text */
-----------------------------------------------------------------
#default {
color #333;
}
Can you tell me what I'm doing wrong which causes the third paragraph
to be
red instead of dark gray?
I wrote to the author, and he told me that there had been a mistake in
the example (not enough specificity), and that the CSS rule should
read:
/* Make text red only for paragraphs within the box class */
#container .box p {
color: #F00;
}
I have tried that, and it still doesn't work for me. Can you tell me
what I'm doing wrong, and how to correct it?
Thank you.
Comment