943,907 Members | Top Members by Rank

Ad:
Jan 2nd, 2009
0

Two menus to have different colour attributes

Expand Post »
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.
Similar Threads
Reputation Points: 11
Solved Threads: 1
Light Poster
Borderline is offline Offline
49 posts
since Apr 2008
Jan 2nd, 2009
0

Re: Two menus to have different colour attributes

Quote ...
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
Reputation Points: 10
Solved Threads: 4
Light Poster
DiGSGRL is offline Offline
45 posts
since May 2008
Jan 2nd, 2009
0

Re: Two menus to have different colour attributes

Excellent, many thanks!
Reputation Points: 11
Solved Threads: 1
Light Poster
Borderline is offline Offline
49 posts
since Apr 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: What do YOU want to see in my web designing programe? :D
Next Thread in HTML and CSS Forum Timeline: Image Position Moves on Resize of Window





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC