473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Different colored link

Hi all,

I'm using an open source template from oswd.org and I wanted to change the color of one of the links to make it stand out from the others. Here's the CSS code:

Expand|Select|Wrap|Line Numbers
  1. .nav3-grid {width:199px; border-bottom:solid 1px rgb(200,200,200);}
  2. .nav3-grid dt a, .nav3-grid dt a:visited {display:block; min-height:2.0em /*Non-IE6*/; height:auto !important; height:2.0em /*IE6*/; line-height:2.0em; padding:0px 10px 0px 20px;  border-top: solid 1px rgb(200,200,200); text-decoration:none; color:rgb(70,122,167); font-weight:bold; font-size:120%;}
  3. .nav3-grid dd a, .nav3-grid dd a:visited {display:block; min-height:1.7em /*Non-IE6*/; height:auto !important; height:1.7em /*IE6*/; line-height:1.7em; padding:0px 10px 0px 40px; border:none; font-weight:normal; text-decoration:none; color:rgb(70,122,167); font-size:120%;}
  4. .nav3-grid dt a:hover, .nav3-grid dd a:hover {background-color:rgb(225,225,225); color:rgb(42,90,138); text-decoration:none;}
  5. .nav3-grid dt a.inquiry:hover, .nav3-grid dd a.inquiry:hover {color:rgb(90,90,90); text-decoration:none;}
  6.  
Note the a.inquiry:hover above - I added that entire line in hopes that would change the color.

And here is the HTML in question:

Expand|Select|Wrap|Line Numbers
  1.         <!-- Navigation Level 3 -->
  2.         <div class="round-border-topright"></div>
  3.         <h1 class="first">TurnkeySolutionsNow</h1>        <!-- Navigation with grid style -->
  4.         <dl class="nav3-grid">
  5.           <dt><a href="whyusetsn.html">Why Use TSN</a></dt>
  6.           <dt><a href="productdevelopment.html">Product Development </a></dt>
  7.             <dd><a href="productdevelopment-productdevelopment.html">Product Development </a></dd>
  8.             <dd><a href="productdevelopment-engineering.html">Engineering</a></dd>
  9.             <dd><a href="productdevelopment-productdesign.html">Product Design</a></dd>
  10.             <dd><a href="productdevelopment-productprotection.html">Product Protection</a></dd>
  11.             <dd><a href="productdevelopment-engineeringservices.html">Engineering Services</a></dd>
  12.             <dd><a href="productdevelopment-industries.html">Industries</a></dd>
  13.             <dd><a href="productdevelopment-inquiry-form.html" class="inquiry">Inquiry Form</a></dd>
  14.           <dt><a href="contact.html">Contact Us</a></dt>
  15.         </dl>                        
  16. <p>&nbsp;</p>
  17.       </div>
  18.  
The link I want to change color is the Inquiry Form. I thought by adding class="inquiry" I could define the color, but I'm having issues.

Any help is appreciated - thanks in advance!

Patrick
Sep 11 '07 #1
1 2050
Death Slaught
1,137 1GB
Hi all,

I'm using an open source template from oswd.org and I wanted to change the color of one of the links to make it stand out from the others. Here's the CSS code:

Expand|Select|Wrap|Line Numbers
  1. .nav3-grid {width:199px; border-bottom:solid 1px rgb(200,200,200);}
  2. .nav3-grid dt a, .nav3-grid dt a:visited {display:block; min-height:2.0em /*Non-IE6*/; height:auto !important; height:2.0em /*IE6*/; line-height:2.0em; padding:0px 10px 0px 20px;  border-top: solid 1px rgb(200,200,200); text-decoration:none; color:rgb(70,122,167); font-weight:bold; font-size:120%;}
  3. .nav3-grid dd a, .nav3-grid dd a:visited {display:block; min-height:1.7em /*Non-IE6*/; height:auto !important; height:1.7em /*IE6*/; line-height:1.7em; padding:0px 10px 0px 40px; border:none; font-weight:normal; text-decoration:none; color:rgb(70,122,167); font-size:120%;}
  4. .nav3-grid dt a:hover, .nav3-grid dd a:hover {background-color:rgb(225,225,225); color:rgb(42,90,138); text-decoration:none;}
  5. .nav3-grid dt a.inquiry:hover, .nav3-grid dd a.inquiry:hover {color:rgb(90,90,90); text-decoration:none;}
  6.  
Note the a.inquiry:hover above - I added that entire line in hopes that would change the color.

And here is the HTML in question:

Expand|Select|Wrap|Line Numbers
  1.         <!-- Navigation Level 3 -->
  2.         <div class="round-border-topright"></div>
  3.         <h1 class="first">TurnkeySolutionsNow</h1>        <!-- Navigation with grid style -->
  4.         <dl class="nav3-grid">
  5.           <dt><a href="whyusetsn.html">Why Use TSN</a></dt>
  6.           <dt><a href="productdevelopment.html">Product Development </a></dt>
  7.             <dd><a href="productdevelopment-productdevelopment.html">Product Development </a></dd>
  8.             <dd><a href="productdevelopment-engineering.html">Engineering</a></dd>
  9.             <dd><a href="productdevelopment-productdesign.html">Product Design</a></dd>
  10.             <dd><a href="productdevelopment-productprotection.html">Product Protection</a></dd>
  11.             <dd><a href="productdevelopment-engineeringservices.html">Engineering Services</a></dd>
  12.             <dd><a href="productdevelopment-industries.html">Industries</a></dd>
  13.             <dd><a href="productdevelopment-inquiry-form.html" class="inquiry">Inquiry Form</a></dd>
  14.           <dt><a href="contact.html">Contact Us</a></dt>
  15.         </dl>                        
  16. <p>&nbsp;</p>
  17.       </div>
  18.  
The link I want to change color is the Inquiry Form. I thought by adding class="inquiry" I could define the color, but I'm having issues.

Any help is appreciated - thanks in advance!

Patrick
Try changing the "class" to "id" like this:

HTML:

[HTML]<a href="location" id="specialLink">Text</a>[/HTML]
CSS:

Expand|Select|Wrap|Line Numbers
  1. a#specialLink
  2. {
  3. color: black;
  4. hover: red;
  5. background-color: blue;
  6. }
the CSS needs to be in an external CSS document. So now any link with the "id" 'specialLink' will have those colors.

Hope it helps, Death
Sep 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style...
0
by: Manfred Kooistra | last post by:
I have positioned a text link over an image, and when I hover over the link, in Firefox a 1px-wide text-high white bar appears immediately to the left of the first letter of this link. CSS for the...
7
by: ashkaan57 | last post by:
Hi, I was trying to display a small colored square using <table> tag. It worked fine on the screen but when I do print preview, the square shows up as white. I used both: <table width="15"...
2
by: None | last post by:
How do i write lines with different colors in a textbox? I've tried using the forecolor property and it just takes the last color. eg. TextBox1.ForeColor = Color.Red TextBox1.Text = "test" & "...
0
by: lazaridis_com | last post by:
Colored Code Blocks Pudge generated documentation can contain colored code blocks, using the rst directive "..code-block:: Python" (an other languages supported by SilverCity). ...
7
by: Rohan | last post by:
Hello, Can some one tell me how do I get colored text. Say when I want to write something in a text file , how do I get it colored.
2
lotus18
by: lotus18 | last post by:
Hello World Can anyone explain to me why i'm having a blue colored text in some of my files. My Local Disk (D:) also got it. I think I got this problem when I share my Local Disk (D:) over the...
6
by: CodeTilYaDrop | last post by:
I was wondering how some people have colored code and others do not. How do I get the colored code to show up in the forum? I think you can read it better. I was just curious so I can do it in the...
2
by: khacthuy | last post by:
I need to write a program with content: Colored plane graphs. Tell people what I know. I always code for the study. Thanks please send me mail: khacthuy.3k@gmail.com I come from VietNamese...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.