NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page CSS hyperlinks different colors, different places?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-23-2006, 09:10 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Jun 2006
Location: USA
Posts: 4
Historica is an unknown quantity at this point
 



CSS hyperlinks different colors, different places?


Hi,

Hopefully this will be a simple question for the members of this forum: I have placed a number of my hyperlinks / navigation on a dark background - therefore they are all light colors. Now, I want to put additional hyperlinks throughout the site on a white background. I am still using tables throughout the site but is there a way to do this using my external CSS style sheet and the DIV tag?

Any help is greatly appreciated.

Thanks.
Historica is offline  
Old 06-23-2006, 10:20 AM   #2 (permalink)
New Member
Join Date: May 2006
Location: Texas
Posts: 21
RedMatrix is an unknown quantity at this point
 



Hi Historica,

The short answer is yes, it's possible. There are probably many ways to accomplish this goal.

One such way is to use DIV id's.

For instance, your CSS could look like this:

Code:
#dark a { color: white; }
#light a { color: black; }
a:link, a:visited, a:active {text-decoration:none;}
a:hover {text-decoration: underline;}
And your HTML could be:
????: NamePros.com http://www.namepros.com/programming/210052-css-hyperlinks-different-colors-different-places.html
Code:
<DIV id="dark">
   <a href="#">This Link is white, </a>
</div>
<DIV id="light">
   <a href="#">and this one is black.</a>
</div>
__________________
Heroes Forum & Lounge
RedMatrix is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:23 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger