Previous Thread
Next Thread
Print Thread
Rate Thread
#109795 10/24/2003 1:50 PM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
I have this code in my header
Quote
quote:



a.coolLink { color: blue; text-decoration:none; }
a.coolLink:hover { text-decoration:underline; }


a:visited { text-decoration: none; color: #660033;}
a:link { text-decoration: none; color: #660033;}

a:hover { text-decoration: underline; color: #D50019; }
a:active { text-decoration: none; }


and then I have some links that are like
#109796 10/24/2003 3:51 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
a:link takes priority over a.coolLink without :link. Try a.coolLink:link, or put the coolLink classes after rather than before the rest of the a pseudoclasses...


UBB.classic: Love it or hate it, it was mine.
#109797 10/24/2003 4:17 PM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
I figured it out. I forgot to have a a.CoolLink:visited as well, so thats why all the other ones were over ruling it.

laugh ! Thanx

#109798 10/24/2003 4:25 PM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
OK maybe NOT!! LOL

Quote
quote:

a:visited { text-decoration: none;}
a:link { text-decoration: none; color: #ffbe5e;}
a:hover { text-decoration: underline; color: #D50019; }
a:active { text-decoration: none; }

a.menulink:link {
color: #ff9900;
text-decoration: none;
}
a.menulink:hover {
text-decoration: underline;
}
a.menulink:visited {
color: #ff9900;
text-decoration: none;
}
a.menulink:active {
color: #ff9900;
text-decoration: none;
}
now what happens is, some links when u hover over them underline the link, and some dont.

However, I noticed that when u click on a link that the Hover affect works, and try put ur mouse back over the same link, the hover underline doesnt work anymore.

It has something to do with visited I guess.

#109799 10/24/2003 4:37 PM
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
N/M figured the whole thing out, lol

for a.menulink:visited, u cant have text-decoration: none;

because what will happen is, when u visit a link, and then retry to put ur mouse over the link, it wont underline it, because the visited: part has already been declared for no underlines...

Totally makes sense now.. wink

CSS is tricky! laugh BUT I LOVE IT

Sponsored Links
#109800 10/24/2003 5:07 PM
Joined: Oct 2000
Posts: 73
Member
Member
Offline
Joined: Oct 2000
Posts: 73
Actually you should put them in this order:

link
visited
hover
active

in order to get visited links with both a hover and an active effect smile


aleina

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services