I've been playing with Bootstrap, and Aaron's related behaviors --
thanks Aaron!

I encountered a bit of a surprise: when serving up documents without a
doctype to Chrome and Safari, CSS applied to a:hover does not work if
the a tag has no href. This is not an issue in FireFox.

<a href="#">My Link</a> // recognized by a:hover classes
<a>My Link</a> // not recognized by a:hover classes in webkit quirks
mode

I went to replicate this issue in jsfiddle, only to find the CSS
worked because jsfiddle serves up:

<!DOCTYPE html>

Sorry for the lack of a fiddle, but the code is very short. The intent
is to use :hover to make links a blue background with white text.

Broken: http://demo.quandis.net/css.html
Working: http://demo.quandis.net/css.doctype.html

So, I have a solution to my issue. I realize that DOCTYPE is
controlling standard mode vs. quirks mode of the browsers. I would not
have been surprised by anything in IE, but was rather surprised by the
issue in webkit.

My question to the group is, has anyone encountered this an arrived at
a different workaround, particularly alternate CSS?

Thanks in advance,

Eric

Reply via email to