Thanks for the response. I understand all of that, however your example does not specifically refer to div#container vs #container (i.e. In what instance would you write "div" infront of "#"?)
I can come up with examples for p#container (see below). However I still cannot see a reason for ever needing to write div#container?
Flashing red text anywhere inside <body>:
Code:
body {
color:#ff0000;
text-decoration: blink;
}
Underlined green text anywhere inside <div id="container">:
Code:
#container {
color: #00ff00;
text-decoration: underline;
}
Normal blue text anywhere inside <div id="container">:
Code:
p#container {
color: #0000ff;
text-decoration: 0;
}
HTML:
Code:
<body>
<p>This is red flashing text</p>
<div id ="container">
This is green underlined text
<p id="container">This is blue text</p>
</div>
</body>
Last edited by EViS; 03-03-2011 at 05:29 AM..
|