| | |
Two link types in different colours
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 41
Reputation:
Solved Threads: 1
My navigation system consists of a main bar, which changes colour when a mouse hovers over it. Clicking this link results in a secondary menu appearing, in silver/white.
However, the content background is white, so these link colours aren't suitable. I have tried changing my CSS code so that the link colours are different for items within the content div, but haven't pulled it off as yet. I was hoping someone could point me in the right direction.
Page Code:
CSS Code:
However, the content background is white, so these link colours aren't suitable. I have tried changing my CSS code so that the link colours are different for items within the content div, but haven't pulled it off as yet. I was hoping someone could point me in the right direction.
Page Code:
HTML and CSS Syntax (Toggle Plain Text)
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Further Flight</title> <link rel="stylesheet" type="text/css" href="http://www.further-flight.co.uk/style/20080820.css"/> </head> <body> <div id="secondary"><?php include($_SERVER['DOCUMENT_ROOT'].'/style/secondary_previews.php');?></div> <div id="header"><?php include($_SERVER['DOCUMENT_ROOT'].'/style/header.php');?></div> <div id="logo"><?php include($_SERVER['DOCUMENT_ROOT'].'/style/logo.php');?></div> <div id="navigation"><?php include($_SERVER['DOCUMENT_ROOT'].'/style/main.php');?></div> <div id="content"> <h2>Overview of Jackpot Previews</h2> <p> <a class="content"> 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></a> </div>
CSS Code:
HTML and CSS Syntax (Toggle Plain Text)
/*------ BASIC LAYOUT ------*/ #secondary{ margin: 0px 0px 0px 0px; width: 100%; height: 15px; font: 0.7em arial, verdana, sans-serif; background-color: #494949; padding: 5px 0px 5px 0px; text-indent: 10px; color: silver; } #logo{ height: 80px; background-color: #000000; z-index: 1; } #header{ position: absolute; top: 20px; right: 50px; text-align: right; z-index: 2; } #footer{ background: url(/images/footer.png) repeat-x; text-align: center; padding: 10px 0; font: bold 0.8em arial, verdana, sans-serif; text-align: center; color: #FFFFFF; border: 1px solid #000000; } /*------ ELEMENTS AND TAGS ------*/ a:link { color: white; text-decoration:none; } a:visited { color: silver; text-decoration:none; } a:hover { color:silver; text-decoration:bold; } body { background-image: url("/images/20080820_back1.png"); background-repeat: repeat; } h1 { color: #FFFFFF; font: 2em arial, verdana, sans-serif; letter-spacing: 2px; } h2 { color: #C0C0C0; font: 0.9em arial, verdana, sans-serif; } /*------ CONTENT BOXES ------*/ div#content { margin-top: 30px; padding: 20px; border: 1px solid #000000; background: #FFFFFF; font: 0.8em arial, verdana, sans-serif; } div#content h2 { position: relative; float: left; margin: -38px 0 15px 0; padding: 8px; border: 1px solid #000000; background: black url(/images/blockactive.gif) center center repeat-x; font: bold 1em arial, verdana, sans-serif; color: #FFFFFF; } div#content h1 { font: bold 0.8em arial, verdana, sans-serif; color: #000000; } 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; }
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: Firefox Problem
- Next Thread: Dropdown Scripts
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity create css design development displayimageinsteadofflash dreamweaver drupal 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. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl






