| | |
Two menus to have different colour attributes
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2008
Posts: 41
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
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash font fonts form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl





