views:

959

answers:

10

just started using google chrome, and noticed in parts of our site, all the links on the page are bright red. They should be black with a dotted underline.

Is there some gotcha in webkit rendering that turns all links red regardless of style?

A: 

Have you set a :visited setting in your stylesheet?

Ross
A: 

Run your CSS file and your HTML file through the w3c validators. I had a similar problem when testing an application in Safari. The problem was in my code.

Brian Warshaw
A: 

code is valid.
:visited is set, not to red, but its every link, even ones that are backed by js

everything works, including the visited stuff, in IE and firefox

DevelopingChris
A: 

Make sure you spelled visited right...

Shawn Simon
A: 

Are your styles in your HTML doc or an external stylesheet? And can you provide a link to the site?

Brian Warshaw
+1  A: 

Chrome has a bug where it obeys alternate stylesheets. Do you have an alternate stylesheet that makes links red?

Sam Hasler
A: 

@Brian Warshaw External sheet
Link not applicable, private beta site on internal ip address.

DevelopingChris
+4  A: 

Are all of the resources that you're linking to in the present at the locations where your page is seeking them (verify this by actually checking it). I've also had an issue when checking an app in Safari where I was attempting to pull a file that wasn't there and I had very similar output to yours (red links).

EDIT: Adding ChanChan's find to the answer, since it explains it so well:

k, found it.

If any of your stylesheets is missing or pathed incorrectly, it throws a 404. If your 404 page has inline styles, they get respected via the "alternate sheets" rule in webkit.

Thus, the red links on the "yellow screen of death" are causing my problem in overlap.

Brian Warshaw
+1  A: 

k, found it.

If any of your stylesheets is missing or pathed incorrectly, it throws a 404.
If your 404 page has inline styles, they get respected via the "alternate sheets" rule in webkit.

Thus, the red links on the "yellow screen of death" are causing my problem in overlap.

DevelopingChris
+1  A: 

That explains the problem I had with my app--it was a Rails app, which also has 404 pages with red applied to some of the styles. Makes a whole lot more sense now than it did back then. Too bad you can't accept your own answer!

Brian Warshaw