Bule Posted January 1, 2013 Share Posted January 1, 2013 I'm trying (and have tried a few different ways) to change the anchor link (indicated by a comment) to a different color. I'm not having success. In my endeavors, I was even able to answer a question for someone else, but still can't make my own example work. <!DOCTYPE HTML ><html> <head> <title>Syntax Reference</title> <style> body { background-color:#FEFAF2; color:black; } h1 { color:#A0522D; } table { width:70%; } table, th, td { background-color:#FDF5E6; border-collapse:collapse; font-size:12px; border:1px solid #000000; } a.term{ color:red; } </style> </head> <body> <h1>Syntax Reference</h1> <p>This page has a table.</p> <table> <thead> <tr> <td colspan="2"> <!-- Make this red --> <a style="term" id="if">if </a> </td> </tr> <tr> <th>Arguments</th> <th>Result</th> </tr> </thead> <tbody> <tr> <td>Cond</td> <td>Pops data from stack (Cond) and executes following commands if true.</td> </tr> </tbody> </table> </body></html> Any advice on what I"m doing wrong? I tried the following alternatives in my css: .term a {color:red}a .term {color:red} and a few others I don't recall right now. TIA Link to comment Share on other sites More sharing options...
dsonesuk Posted January 1, 2013 Share Posted January 1, 2013 a.term {color:red;} refers to class as in class="term" NOT style="term" Link to comment Share on other sites More sharing options...
Labtec Posted January 2, 2013 Share Posted January 2, 2013 You can style it like so: <a href="some_page.php" class="red_link">if</a> Then in your CSS: .red_link{ color: red;} Kind regards, Lab! Link to comment Share on other sites More sharing options...
Bule Posted January 2, 2013 Author Share Posted January 2, 2013 Holy cow! I've been staring at that for like a couple of days now. I even ran it through the syntax validations at W3C for both the HTML and CSS and nothing popped. Thanks guys! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now