artist for hire-bradley stone - 3d - design- graphics -web...
Bradley Stones Home PageMore about the artist.Resume and PortfolioMy art and design servicesMy art and design galleryGraphic Design Tutorials Free 3d Models and Textures Art and design links

Tired of resumes?

Rather than boring docs. Grab these
Full Color PDFs.

design portfolio
Portfolio PDF

 

guide to 3d
Guide to 3D for professionals interested
in learning more about 3D.

 

 

Get Acrobat Reader Free

Get Acrobat
Reader.
 
A Simple Screw-up: The case of the CSS disabled hover state.

I had been experiencing a problem recently with my CSS. I am much more of an artist than a coder I guess.


I had a set of links that kept getting stuck in a "visited" state where I couldn't get the hover color to show up. Basically it looked like once you clicked on a link it just sorta died. I didn't like it so I had to do some diggin. I felt dumb when I found the answer. So of course I had to share my embarrassment so it would be even more profound. So here it is. Its a stupid mistake but one so simple that I bet I am not the only one who has ever over looked it.

Here have a look.. (I'll highlight it so you don't feel as dumb as I did if you didn't figure it out :)

 

a:link { font-family: Verdana; font-weight: normal; color: #738B72; text-decoration: none }
a:active { font-family: Verdana; font-weight: normal; color: #99CC33; text-decoration: none }
a:visited { font-family: Verdana; font-weight: normal; color: #738B72; text-decoration: none }

a:hover { font-family: Verdana; font-weight: normal; color: #99FF33; text-decoration: none }


a:link { font-family: Verdana; font-weight: normal; color: #738B72; text-decoration: none }
a:active { font-family: Verdana; font-weight: normal; color: #99CC33; text-decoration: none }
a:hover { font-family: Verdana; font-weight: normal; color: #99FF33; text-decoration: none }

a:visited { font-family: Verdana; font-weight: normal; color: #738B72; text-decoration: none }

 

The difference between these two seems mundane. Just a line in a certain order but duh!

 

In the first one when you visit a link and come back the link will not work with the" hover" because the "hover" is placed before the "visited" part of the css

 

If you want to make the hover work consistently you have to have it somewhere below the "visited" part of the CSS or else the "visited" part simply overrides the "hover" part... :)

 

 

 

 

Contact Info

 

css links header

 

Check out some of these links for the real meat and potatoes of CSS:

 

www.w3.org

 

A list apart CSS section

Have any good CSS tips and tricks? Email me and send me the links.