CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 21st, 2002, 07:54 PM
tdev tdev is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 6 tdev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question help with rollover CSS. I need one link to turn blue and another black.

Hi,

I was wondering how to write CSS for a page where I have two sets of links.

1. Regular links which are blue and when you rollover them they turn light blue. This I have ok.

2. my problem is a menu where I want my links to be white and when you rollover them they turn black.

The only way I can get close to this is to force the menu links to stay white all the time.

Does anyone know how I can have two sets of links colors on the same page and two different hover states?

Thanks.

Reply With Quote
  #2  
Old January 21st, 2002, 09:50 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
Code:
<html>
<head>
<style>
a:link
{ color: blue; font-size: 10px; text-decoration: underline }
a:active
{ color: blue; font-size: 10px; text-decoration: underline }
a:visited
{ color: blue; font-size: 10px; text-decoration: underline }
a:hover
{ color: green; font-size: 10px; text-decoration: none }

a.menu:link
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:active
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:visited
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:hover
{ color: green; font-size: 14px; font-weight: bold; text-decoration: none }
</style>
</head>

<body>
<p><a href="#" class="menu">Menu Link 1</a><br>
  <a href="#" class="menu">Menu Link 2</a></p>
<p><a href="#">Normal Link 1</a><br>
  <a href="#">Normal Link 2</a></p>
</body>
</html>

(*Change code to suit.)

You have your default classes, a:link, a:hover etc and you also have pseudo-classes a.menu:link, a.menu:hover and in your hyperlinks you assign this class by using class="menu"

Last edited by degsy : January 21st, 2002 at 10:05 PM.

Reply With Quote
  #3  
Old January 22nd, 2002, 09:57 AM
tdev tdev is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 6 tdev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Thanks!

Thanks a million!

This will really help my project a lot and something I can use easily in the future.

Cheers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > help with rollover CSS. I need one link to turn blue and another black.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway