php forum
php mysql forum
php mysql smarty
 
Topic Options
#109795 - 10/24/03 01:50 PM CSS troubles!
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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 <a class="CoolLink" href="blahblah></a>

but those links dont use the coolLinks class defnined in the header, they use the stupid default a.hover ones .. How do i fix this!
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#109796 - 10/24/03 03:51 PM Re: CSS troubles!
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
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.

Top
#109797 - 10/24/03 04:17 PM Re: CSS troubles!
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#109798 - 10/24/03 04:25 PM Re: CSS troubles!
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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.
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#109799 - 10/24/03 04:37 PM Re: CSS troubles!
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#109800 - 10/24/03 05:07 PM Re: CSS troubles!
aleina Offline
Member

Registered: 10/14/00
Posts: 67
Loc: Sweden
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

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks