Two menus to have different colour attributes

Please support our HTML and CSS advertiser: $6.99 Domain Names at 1&1. Includes Free Privacy. Save Now!
Thread Solved

Join Date: Apr 2008
Posts: 47
Reputation: Borderline is an unknown quantity at this point 
Solved Threads: 1
Borderline Borderline is offline Offline
Light Poster

Two menus to have different colour attributes

 
0
  #1
Jan 2nd, 2009
Evening

I've been experiencing problems while trying to give my two menus different attributes - could anyone advise the correct method I need for this, please?

The menu works as I want it, but I'd like to have any link in the content box displayed in a different colour.

CSS
HTML and CSS Syntax (Toggle Plain Text)
  1. /*------ ELEMENTS AND TAGS ------*/
  2.  
  3. a:link {
  4. color: white;
  5. text-decoration:none;
  6. }
  7.  
  8. a:visited {
  9. color: silver;
  10. text-decoration:none;
  11. }
  12.  
  13. a:hover {
  14. color:silver;
  15. text-decoration:bold;
  16. }
  17.  
  18. div#content p {
  19. clear: left;
  20. color: #000000;
  21. text-align: justify;
  22. }
  23.  
  24. a.content:link {
  25. color: blue;
  26. text-decoration:none;
  27. }
  28.  
  29. a.content:visited {
  30. color: purple;
  31. text-decoration:none;
  32. }
  33.  
  34. a.content:hover {
  35. color:red;
  36. text-decoration:bold;
  37. }

PAGE:
HTML and CSS Syntax (Toggle Plain Text)
  1. <div id="content">
  2. <h2>Overview of Jackpot Previews</h2>
  3.  
  4. <p>
  5. Our resident columnist Pip, from Lodgehill Stables, selects three races a night to preview. As soon as racing
  6. begins, we hope to bring this popular feature back to your screens!
  7. </p>
  8.  
  9. </div>
  10.  
  11. <div id="content">
  12. <h2>Latest Previews</h2>
  13.  
  14. <p>
  15. <a class="content">
  16.  
  17. <?php
  18. // Connects to your Database
  19. mysql_connect("******", "******", "******") or die(mysql_error());
  20. mysql_select_db("******") or die(mysql_error());
  21. $data = mysql_query("SELECT * FROM `race` WHERE `month`='sep08' OR `month`='nov08'
  22. ORDER BY `id`") or die(mysql_error());
  23. ?>
  24. <table cellpadding="2" width="95%">
  25. <tr>
  26. <th align='left'>Date</th>
  27. <th align='left'>Race 1</th>
  28. <th align='left'>Race 2</th>
  29. <th align='left'>Race 3</th>
  30. <th align='left'>Previewer</th>
  31. </tr>
  32. <?php
  33. while($info = mysql_fetch_array($data)) {
  34. ?>
  35. <tr>
  36. <td>
  37. <a href="<?php echo $info['link']; ?> ">
  38. <?php echo $info['date']; ?>
  39. </a>
  40. </td>
  41. <td> <?php echo $info['race1']; ?> </td>
  42. <td> <?php echo $info['race2']; ?> </td>
  43. <td> <?php echo $info['race3']; ?> </td>
  44. <td> <?php echo $info['previewer']; ?> </td>
  45. </tr>
  46. <?php
  47. }
  48. ?>
  49. </table>
  50.  
  51. </p> </a>
  52. </div>

Any help would be appreciated.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 45
Reputation: DiGSGRL is an unknown quantity at this point 
Solved Threads: 4
DiGSGRL's Avatar
DiGSGRL DiGSGRL is offline Offline
Light Poster

Re: Two menus to have different colour attributes

 
0
  #2
Jan 2nd, 2009
a.content:link {
color: blue;
text-decoration:none;
}

a.content:visited {
color: purple;
text-decoration:none;
}

a.content:hover {
color:red;
text-decoration:bold;
}
You need to do:
#content a:link{
color:blue
}

That will change all link color inside of the content div
A little clarification goes a long way.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 47
Reputation: Borderline is an unknown quantity at this point 
Solved Threads: 1
Borderline Borderline is offline Offline
Light Poster

Re: Two menus to have different colour attributes

 
0
  #3
Jan 2nd, 2009
Excellent, many thanks!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 630 | Replies: 2
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC