Hi,

Can someone explain to me why the HTML/CSS below seems to allow some
attributes of the H1 within the class to change, but not others?

I see two lines, the second one is centered as I expect but is still
red, not blue.  So it seems the selector is matching the second H1,
but the color attribute is not being applied?

Thanks,

-i

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <style type="text/css">
      div#maindiv h1 { color: #FF0000 }

      div.aclass h1 { color: #0000FF;
                      text-align: center;
      }
      </style>
  </head>

  <body>

    <div id="maindiv">
      <h1>Main div H1</h1>

      <div class="aclass">
        <h1>Aclass H1</h1>
      </div>

    </div>


  </body>
</html>

_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders

Reply via email to