• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

CSS is making me ill

Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
I just don't understand why CSS acts super picky. If you use w3schools "Try-it" editor, it's so hit and miss when it is and isn't going to work. Right now I'm focusing on links (a:link, visited, hover, active) and I'm unable to get it all to behave correctly. I know Firefox disabled this functionality because of a history leak, but that was 2 years ago (and my layout.css.visited_links_enabled is set to "True").

Here is the "Try-it" editor:

http://www.w3schools.com/css/tryit.asp?filename=trycss_link

If I copy and paste the color code from a:hover, it doesn't change.

As always, thanks in advance.

P.S. I'm using Firefox 11.
 
Last edited:

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,049 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
maybe because the link is "visited" ?
 
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
I guess using colors wasn't a great example. The one that's giving me problems "text-decoration: none". Wouldn't setting a:visited as such cause the link to default back to the set a:link color?
 
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
This what I have in the external style sheet:

a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none
}
a:active {
text-decoration: none;
}


If I clear history, the text to defaults to the usual blue. However, once I visit the links, the link colors change to the usual purple. I'd like for them to not change at all.
 
Joined
May 21, 2009
Messages
4,966 (0.91/day)
System Name i7-PC / HTPC / iMac
Processor i7 3820 / Phenom II 940
Motherboard GIGABYTE G1.ASSASSIN2 / M3A79-T Deluxe
Cooling Corsair Hydro H100i / Scythe II (HS only)
Memory G.SKILL Trident X Series 8GB (2 x 4GB) DDR3 1600mhz / 4GB DDR2 1066 (@800) Corsair Dominator
Video Card(s) GB Radeon HD 7950s 3GB / GB Radeon HD 7950s 3GB
Storage 2x 80GB Intel X-25, 2x600gb SATA, 1x1tb 5400RPM storage /1x600GB, 3x500GB,1x160,1x120 SATA
Display(s) 1x 27" Yamakasi / Vizio 42" HDTV
Case Lian Li Lancool PC-K58 / Antec 900
Audio Device(s) HT Omega Striker 7.1 / Onboard and HDMI from ATi Card
Power Supply PC Power & Cooling 750W / 610W
Software Ubuntu / Windows 8.1 Pro / OS X / PHPStorm / Gaming
that's not decoration, that's color
 
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
Well, I looked around a bit more and I guess there is no way to keep visited links from changing color unless they are set to the unvisited link's color. In other words;

a:link {
color: red;
text-decoration: none;
}
a:visited {
color: red;
text-decoration: none;
}
a:hover {
text-decoration: none
}
a:active {
text-decoration: none;
}


Though I'm pretty certain this is the case, I'd like to get a confirmation from one of the knowledgeable web designers around here (whomever that may be).

Thanks.
 
Top