Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: incrediBILL

Message Too Old, No Replies

Chrome 5 highlights all my links

using the background hover colours - but why?

     
7:59 pm on Jun 22, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 5, 2002
posts: 1318
votes: 0


I don't use Chrome much but was surprised to see (in version 5.0.375.70) that my site has all the links highlighted by a coloured background! This is the colour I have set for the hover effect, which is green for links and brown for visited links. Even the top menu is coloured in!

The effect goes away when I move the mouse off the page.

I haven't seen this effect on any other sites in Chrome. Anyone know what is happening?

I'm wondering if it's my code at fault, but other browsers are fine. I've sent an error report to Google.

I am on Windows XP. My doctype is XHTML Strict. The links are styled in a separate stylesheet.
11:48 pm on June 22, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


Most likely there is an error in the style sheet. The rule for any problem of this sort is validate the code, both the HTML and the CSS. Also, links should be styled in a very specific order being LVHA (Link, Visited, Hover, Active) not to mention the :focus pseudo-class.

HTML Validator [validator.w3.org]
CSS Validator [jigsaw.w3.org]

Kaled.
8:04 am on June 23, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts:3123
votes: 0


Create a simple test page with just a link and your link styles - does it still behave this way?
9:05 pm on June 23, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 5, 2002
posts: 1318
votes: 0


Thanks. I validated the CSS and found some minor errors which I have corrected. I also validated the HTML and found one typo which has also been corrected.

Chrome still displays the site oddly.

I looked at my link styles and I have the following styles defined:

a, a *
:link, :link *
:visited, :visited *
:link:hover, :link:hover *
:visited:hover, :visited:hover *


I don't seem to have any active or focus styles set.

I'll try and do a test page and see if I can nail this one!

[edited by: tedster at 12:34 am (utc) on Jun 24, 2010]