Forum Moderators: not2easy
<style type="text/css">
h1 {
color:red;
background-color:blue;
font-weight:bold;
}
h3 {
color:blue;
font-weight:bold;
}
</style>
Any idea why?
well thats emberassing
From an education viewpoint the reason why it fails is that the "
<style type="text/css">" is being considered part of the first multi-line (together with the "h1") selector. Since it's syntax is off, the entire entry isn't going to be used. To find these errors the CSS validator [jigsaw.w3.org] helps a lot. Whenever you have errors like this, check your CSS (and html [validator.w3.org]) .
Basically is sees:
<style type="text/css"> h1 {
color:red;
background-color:blue;
font-weight:bold;
}
It won't find a h1 with a parent that resembles to anything like that, hence the rule doesn't get used.