treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Tag HTML in CSS

  • Hi all,

    i have a problem with tag html in css. the case is like this :

    /* This will be save as design.css */
    p {
    color: #cccccc;
    }


    then, i create a html page like this:

    <!-- This will be save as index.html -->
    ...
    <link href=\"/css/design.css\" rel=\"stylesheet\" type=\"text/css\"/>
    <body>
    <p>Life doesn't last forever</p>
    <p>So we have to help each other, and live life to the fullest</p>
    <p><!--#include virtual=\"/include/copyright.inc\"--></p>
    ...


    The problem is: i want the include file color is i.e. #aaaaaa not using the css i defined.

    Any related reply is so appreciated.. :)
  • Give it a class.
     <p>Life doesn't last forever</p>
    <p>So we have to help each other, and live life to the fullest</p>
    <p class=\"whatever\"><!--#include virtual=\"/include/copyright.inc\"--></p>

    p {
    color: #cccccc;
    }

    p.whatever {
    color: #aaa;
    }