Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Having trouble with a:hover styling on CSS.
New Posts  All Forums:Forum Nav:

Having trouble with a:hover styling on CSS. - Page 2

post #11 of 16
Quote:
Originally Posted by NinjaSushi2 View Post

Quote:
Originally Posted by 3930K View Post

This is your problem:

(From W3C Schools)
Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!
Epic face palm... doh.gif

Bought to find out! lol

Got the link for it?

Edit: Doesn't work.

Works for me in Google Chrome...

What browser are you using? It could be the way you're doing your links, as in, perhaps the individual classes on each link is overwriting and superseding your a:hover in your global style sheet
Beast of Burden
(19 items)
 
Cool story, bro!
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 3770k Gigabyte Z77X-UD5H Gigabyte HD 7970 Reference Ripjaws Z 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 Caviar Black ASUS DVD XSPC Raystorm 
CoolingCoolingCoolingOS
EK FC-7970 w/ Backplate Copper/Acetal RX360 w/ 3x Yate Loon High Speed in Push XSPC Dual Bay Res w/ D5 Pump Windows 7 
MonitorMonitorKeyboardPower
ASUS VE226H ASUS VE226H Cooler Master Quickfire Rapid Corsair HX850 
CaseMouseMouse Pad
HAF 932 Advanced Razer Deathadder QcK Mini 
CPUMotherboardGraphicsRAM
Q9550@ 3.5GHz w/ 1.191v Gigabyte GA-EP45-UD3P Sapphire Reference 5850 @ 775/1100 G.SKILL 4GB (2 x 2GB) DDR2 1066 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 Spinpoint F3 Caviar Black ASUS DVD-RW 
CoolingOSMonitorKeyboard
Arctic Cooling Freezer 7 Pro Windows 7 Home Premium 64-bit Samsung 23" Saitek Eclipse III 
PowerCaseMouse
Corsair 430W NZXT Source 210 Wolf King 
  hide details  
Reply
Beast of Burden
(19 items)
 
Cool story, bro!
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 3770k Gigabyte Z77X-UD5H Gigabyte HD 7970 Reference Ripjaws Z 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 Caviar Black ASUS DVD XSPC Raystorm 
CoolingCoolingCoolingOS
EK FC-7970 w/ Backplate Copper/Acetal RX360 w/ 3x Yate Loon High Speed in Push XSPC Dual Bay Res w/ D5 Pump Windows 7 
MonitorMonitorKeyboardPower
ASUS VE226H ASUS VE226H Cooler Master Quickfire Rapid Corsair HX850 
CaseMouseMouse Pad
HAF 932 Advanced Razer Deathadder QcK Mini 
CPUMotherboardGraphicsRAM
Q9550@ 3.5GHz w/ 1.191v Gigabyte GA-EP45-UD3P Sapphire Reference 5850 @ 775/1100 G.SKILL 4GB (2 x 2GB) DDR2 1066 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 Spinpoint F3 Caviar Black ASUS DVD-RW 
CoolingOSMonitorKeyboard
Arctic Cooling Freezer 7 Pro Windows 7 Home Premium 64-bit Samsung 23" Saitek Eclipse III 
PowerCaseMouse
Corsair 430W NZXT Source 210 Wolf King 
  hide details  
Reply
post #12 of 16
Thread Starter 
Code:
<!DOCTYPE html>
<html lang="en">

<!--

        documentation segment
        website: Pittsburgh
        web page: pittsburgh.htm
        author: manderson
        date created: feb.2013

-->

<head>
<meta charset="utf-8">
<title>60's</title>
<style type="text/css">

body
{
        background-image: url(../images/background.jpg);
}
#wrapper
{
        width: 1000px;
        margin: 0 auto;
}
#master
{
        position: absolute;
        padding: 0px;
        border: 1px solid #000;
        background-color: #c1cdcd;
        width: 1000px;
        height: 975px;
        top: 10px;
}
#message
{
        position: absolute;
        padding: 0px;
        /*
        border-top: 1px solid #606060;
        border-left: 1px solid #606060;
        border-right: 1px solid #606060;
        */
        background-color: #c1cdcd;
        width: 820px;
        height: 50px;
        top: 50px;
        left: 88px;
}
#navigation
{
        position: absolute;
        padding: 0px;
        /*
        border-bottom: 1px solid #606060;
        border-left: 1px solid #606060;
        border-right: 1px solid #606060;
        */
        background-color: #c1cdcd;
        width: 820px;
        height: 50px;
        top: 100px;
        left: 88px;
}
#content
{
        position: absolute;
        padding: 10px;
        border: 1px solid #000;
        background-color: #fff;
        width: 800px;
        height: 575px;
        top: 175px;
        left: 88px;
}
#footer
{
        position: absolute;
        padding: 10px;
        border: 5px solid #fff;
        background-color: #000;
        width: 800px;
        height: 100px;
        top: 805px;
        left: 85px;
}
#footer2
{
        position: absolute;
        padding: 0px;
        border: transparent;
        background-color: #000;
        width: 800px;
        height: 10px;
        top: 820px;
        left: 90px;
}
#footer3
{
        position: absolute;
        padding: 0px;
        border: transparent;
        background-color: #000;
        width: 400px;
        height: 10px;
        top: 840px;
        left: 295px;
        /*
        text-decoration:underline;
        */
}
a
{
        font-family:Trebuchet MS;
        font-size:.1em;
        margin:1em;
        font-weight:900;
        text-decoration:none;
}
a:link, a:visited, a:active, a:hover
{
        color:#ffffff;
        font-size: 1.5em;
}
.text
{
        font-family: Helvetica, sans-serif;
        font-size: 2em;
        font-style:normal;
        font-weight:900;
        text-align:left;
        background:#fff;
        color:#000080;
}
</style>
</head>
<body>
<div id="wrapper" align="center"><!-- begin wrapper -->
<div id="master" align="center"><!-- begin master -->
<div id="message" class="text" align="left"><!-- begin message -->

Pittsburgh, 1960's

</div><!-- end message -->
<div id="navigation" align="left"><!-- begin message -->

<br />
<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="../../index.htm">Home</span> 

<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="shopping.htm">Shopping</span> 

<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="restaurants.htm">Restaurants</span> 

<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="tvradio.htm">TV & Radio</span> 

<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="activities.htm">Activities</span>

</div><!-- end navigation -->
<div id="content" align="left"><!-- begin content -->

<a style="font-family:Trebuchet MS; font-size:1.7em; font-weight:900; color:#000";>WALK DOWN MEMORY LANE in Pittsburgh, Dana Spriggs</span>

<a style="font-family:Trebuchet MS; font-size:1.3em; font-weight:300; color:#000";>

<p>The 1960's started with the Pittsburgh Pirates winning the World Series over the New York Yankees in 1960.</p>

<iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/Bs8foFpXpwU?rel=0" frameborder="5" align="right" allowfullscreen></iframe>

<p>The final phase of the Parkway West project was completed as the Fort Pitt tunnels open on September 1, 1960. Prior to the opening of the tunnels motorists had to exit the Parkway West and go via the West End Circle and go across the point bridge to get to downtown Pittsburgh.</p>

<p>Civic Arena opens in 1961 and many events take place in the new arena. Ice Capades, Ringling Brothers Circus, WWWF wrestling and many concerts took place during the 1960's. The Beatles, Elvis Presley and Frank Sinatra all performed there. In the late 60's KQV radio would present its "Shower of Stars concert series where you got to see 4 or 5 acts. Pittsburgh Penguins hockey was also played at the civic arena in the 60's.</p>

<p>Interstate 79 connecting Erie with Washington, PA, is completed by the late 1960's. "The Bridge to Nowhere" is finally completed in 1969 just in time for Three Rivers Stadium to open in 1970. The bridge was started in the early 60's and then a few years went by before it finally was completed.</p>
</span>

</div><!-- end content -->
<div id="footer" align="left"><!-- begin footer -->

<br />
<a style="font-family:Trebuchet MS; font-size:.9em; font-weight:900; color:#c1cdcd"; href="../../index.htm">Home</span> 
<br />
<a style="font-family:Trebuchet MS; font-size:.9em; font-weight:900; color:#c1cdcd"; href="shopping.htm">Shopping</span> 
<br />
<a style="font-family:Trebuchet MS; font-size:.9em; font-weight:900; color:#c1cdcd"; href="restaurants.htm">Restaurants</span> 
<br />
<a style="font-family:Trebuchet MS; font-size:.9em; font-weight:900; color:#c1cdcd"; href="tvradio.htm">TV & Radio</span> 
<br />
<a style="font-family:Trebuchet MS; font-size:.9em; font-weight:900; color:#c1cdcd"; href="activities.htm">Activities</span> 
</div><!-- end footer -->

<div id="footer2" align="center"><!-- begin footer2 -->
<a style="font-family:Trebuchet MS; font-size:1.2em; font-weight:900; color:#33ffff";>References: Youtube.</span>
</div><!-- end footer2 -->
 
<div id="footer3" align="center"><!-- begin footer3 -->
<a style="text-decoration:underline; font-family:Trebuchet MS; font-size:1.2em; font-weight:900; color:#c1cdcd"; href=https://www.youtube.com/watch?feature=player_embedded&v=Bs8foFpXpwU>Pittsburgh Pirates win World Series 1960</a>
</div><!-- end footer3 -->

</div><!-- end master -->
</div><!-- end wrapper -->














</body
</html>
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
post #13 of 16
Thread Starter 
Oh well. I'm about to turn it in.

That's is just one of the pages though.
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
post #14 of 16
The problem is your putting some styles in the tag so it overwrites whatever you have in the css. So this
Code:
<a style="font-family:Trebuchet MS; font-size:1.2em; color:#000"; href="../../index.htm">Home</span>

should be
Code:
<a href="../../index.htm">Home</span>


and do that for all your a tags, but you're also gonna have to put all the attributes that were inline that we deleted in your css like this :
Code:
a
{
        font-family:Trebuchet MS;
        margin:1em;
        font-weight:900;
        text-decoration:none;
        font-size:1.2em; 
        color:#000
}

now if you do these in your css
Code:
a:link
{
}
a:visited {

}
a:active {

}
a:hover {
        font-size: 150% 
}

it should work. Also you didn't close your body tag properly you forget the closing >. Hopefully everything makes sense
Edited by the_dude - 2/23/13 at 9:40pm
My System
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ Stock Asus P6T ATI HD5870 OCZ 6GB 1333mhz 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Evo Caviar Black 640GB LG DVD Drive Cm Hyper 212+ 
CoolingOSMonitorPower
Arctic Cooling Accelero Twin Turbo II Windows 7 64bit ASUS VW246H Corsair HX850 
Case
CM 690 II Adavanced 
  hide details  
Reply
My System
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ Stock Asus P6T ATI HD5870 OCZ 6GB 1333mhz 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Evo Caviar Black 640GB LG DVD Drive Cm Hyper 212+ 
CoolingOSMonitorPower
Arctic Cooling Accelero Twin Turbo II Windows 7 64bit ASUS VW246H Corsair HX850 
Case
CM 690 II Adavanced 
  hide details  
Reply
post #15 of 16
Thread Starter 
Oh thanks. biggrin.gif
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
Project DayZ
(31 items)
 
   
CPUMotherboardGraphicsGraphics
i7-3770k G1.Sniper 3 Intel(R) HD Graphics 4000 AMD Radeon HD 7900 Series 
GraphicsRAMHard DriveHard Drive
AMD Radeon HD 7900 Series Mushkin DDR3 1600Hz Blackline Samsung F3 Spin point Mushkin Chronos Enhanced SSD 
Optical DriveOSMonitorMonitor
ASUS Windows 7 Ultimate Catleap Q270 ASUS 24" 
KeyboardPowerCaseMouse
Ducky Shine II Brown MX / Orange LED 1000W Seasonic Platinum NZXT Switch 810 Gigabyte Krypton 
Mouse PadAudioOtherOther
Mionix Propus 380 Creative Sound Blast Titanium X-Fi HD Mayhem's DT5Noz CPU Block Scythe Kaze Master Pro Fan Controller 
OtherOtherOtherOther
MDPC-X Sleeving Kit. (Green and Black sleeving) Custom Parts Everywhere Other - Tons of misc items. Objective 2 Amp from JDSLabs 
OtherOtherOtherOther
AKG Q701 2 7970 Swiftech Komodo GPU Blocks Customer Made FrozenQ Reservoir Hardware Labs 420 GT Stealth Radiator 
OtherOtherOther
Alphacool 480.86mm NexXxos Monsta Radiator Alphacool Full VPP655 Pump Bitfenix Recon Fan Controller 
CPUMotherboardGraphicsGraphics
i5-2550k z77 mpower msi 770 lightning msi 770 lightning 
RAMHard DriveHard DriveHard Drive
Mushkin Radioactive 8GB (2 x 4GB) DDR3-1600 Memory Western Digital Caviar Black Western Digital VelociRaptor Samsung 830 
Optical DriveCoolingCoolingCooling
LG UH12nS29 Blu-Ray Reader Alphacool NexXxoS UT60 Full Copper 360mm Alphacool NexXxoS UT60 Full Copper 240mm Alphacool NexXxoS XP³ Light - Acetal Edition - ... 
CoolingCoolingCoolingCooling
Bitspower Water Tank Z-Multi 250 - Full Clear A... Alphacool VPP655 (Laing D5) - With D5 High Flow... EK-FC680 GTX Lightning - Acetal + Nickel EK-FC680 GTX Lightning - Acetal + Nickel 
PowerCaseAudioOther
Silverstone Strider Gold Evolution 750W Silverstone TJ07 ASUS Xonar Essence STX Cougar Vortex 
OtherOtherOtherOther
Cougar Vortex Cougar Vortex Cougar Vortex Cougar Vortex 
  hide details  
Reply
post #16 of 16
Quote:
Originally Posted by NinjaSushi2 View Post

Code:
a:link, a:visited, a:active, a:hover
{
        color:#ffffff;
        font-size: 1.5em;
}

I don't think you want this. You are setting links to 1.5em for all states, not just hover. You won't be able see any difference. On top of that, the_duke's note about inline styles is also correct. In general you should only use inline styles if you absolutely have to, and this is usually because they were set with JavaScript. Inline styles override all other styles except those marked with the !important flag (if you need to use this, you are almost always doing it wrong).

Ignoring CSS selector specificity*, styles get applied in the following order:

External stylesheets
Internal stylesheets (inside style tags)
Inline stylesheets (inside style attributes on individual elements)

The above is why we call them cascading style sheets. In addition to this, styles get applied in the order that they appear for each type of stylesheet above. If you set a:link to have a colour of #fff in an external stylesheet and later a colour of #000 (in the same stylesheet) then it will appear black.

*This can be even more annoying than the fact that styles are applied in a cascading manner. For example:
Code:
.footer a { color: #000 }

... /*200 lines of more CSS*/

a { color : #FFF }

According to what I said above, the latter rule will override the former rule. However, the browser will apply styles with a more specific selector after styles which are less specific, even if the less specific ones are further down in the file. This only applies to styles within the same stylesheet type. An inline style will still override a very specific internal or external selector. See the below example:
Code:
<html>
<head>
<style type="text/css">
<!--
html body.body a#link.black-link
{
    color:#000;
    font-size: 1.5em;
}
 a
{
    color:#fff;
    font-size: 1.5em;
}-->
</style>
</head>
<body class="body">
<a id="link" class="black-link" href="#" style="color:red">link</a> 
</body>
</html>

Despite the fact that I have a very specific (and downright ugly) selector in the internal stylesheet, the link will still be red. If the inline style was removed, the link would be black rather than red or white.

Specificity is a bit tricky. If an element doesn't get styled how you think it should be, use a tool like Firebug or Chrome's element inspector to see the styles being applied and which styles are being overridden by others. Both tools will show styles in the reverse order that they were applied, so the top-most styles which are not overridden are what you will see rendered.
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 2x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveHard DriveOptical Drive
840 Pro Caviar Black OCZ Vertex LG BD-ROM 
OSMonitorMonitorKeyboard
Windows 8.1 Pro x64 Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) 
PowerCaseMouseMouse Pad
Corsair HX-520 CM690 Dogitech G5 Everglide Titan 
Audio
Sennheiser HD201 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 2x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveHard DriveOptical Drive
840 Pro Caviar Black OCZ Vertex LG BD-ROM 
OSMonitorMonitorKeyboard
Windows 8.1 Pro x64 Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) 
PowerCaseMouseMouse Pad
Corsair HX-520 CM690 Dogitech G5 Everglide Titan 
Audio
Sennheiser HD201 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Having trouble with a:hover styling on CSS.