| | |
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:
Solved Threads: 1
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
PAGE:
Any help would be appreciated.
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)
/*------ ELEMENTS AND TAGS ------*/ a:link { color: white; text-decoration:none; } a:visited { color: silver; text-decoration:none; } a:hover { color:silver; text-decoration:bold; } div#content p { clear: left; color: #000000; text-align: justify; } a.content:link { color: blue; text-decoration:none; } a.content:visited { color: purple; text-decoration:none; } a.content:hover { color:red; text-decoration:bold; }
PAGE:
HTML and CSS Syntax (Toggle Plain Text)
<div id="content"> <h2>Overview of Jackpot Previews</h2> <p> Our resident columnist Pip, from Lodgehill Stables, selects three races a night to preview. As soon as racing begins, we hope to bring this popular feature back to your screens! </p> </div> <div id="content"> <h2>Latest Previews</h2> <p> <a class="content"> <?php // Connects to your Database mysql_connect("******", "******", "******") or die(mysql_error()); mysql_select_db("******") or die(mysql_error()); $data = mysql_query("SELECT * FROM `race` WHERE `month`='sep08' OR `month`='nov08' ORDER BY `id`") or die(mysql_error()); ?> <table cellpadding="2" width="95%"> <tr> <th align='left'>Date</th> <th align='left'>Race 1</th> <th align='left'>Race 2</th> <th align='left'>Race 3</th> <th align='left'>Previewer</th> </tr> <?php while($info = mysql_fetch_array($data)) { ?> <tr> <td> <a href="<?php echo $info['link']; ?> "> <?php echo $info['date']; ?> </a> </td> <td> <?php echo $info['race1']; ?> </td> <td> <?php echo $info['race2']; ?> </td> <td> <?php echo $info['race3']; ?> </td> <td> <?php echo $info['previewer']; ?> </td> </tr> <?php } ?> </table> </p> </a> </div>
Any help would be appreciated.
•
•
•
•
a.content:link {
color: blue;
text-decoration:none;
}
a.content:visited {
color: purple;
text-decoration:none;
}
a.content:hover {
color:red;
text-decoration:bold;
}
#content a:link{
color:blue
}
That will change all link color inside of the content div
A little clarification goes a long way.
![]() |
Similar Threads
- Changing Colors For Differant user groups? (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: What do YOU want to see in my web designing programe? :D
- Next Thread: Image Position Moves on Resize of Window
Views: 630 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
alignment background blog browser cart cascade center chrome code compatibility containers create css deleted design designing distortion div divs dreamweaver drupal editor emailmarketing embed explorer fail firefox float font fonts format free frontpage google helprequired-urgent hover html ide ie6 ie7 iframe image input internet internetexplorer iphone javascript jpeg js links list map maps margin marketshare missing mozilla mp3 navigationbars newb object opacity opera override overwrite perl player pnginie6 position positioning prevent problem scroll seo shopping strings studio style table tables tag templates text translation url validation visual visualization w3c web webform website websitedesign windows7 word wordpress xhtml xml xsl youtube





