jeffman Posted September 2, 2010 Share Posted September 2, 2010 Maybe the difference is this part of the DTD, which is not required:"http://www.w3.org/TR/html4/loose.dtd"This puts IE into "almost standard" mode, which is more strict than quirks mode. If you leave that part out, the transitional doctype puts IE into true quirks mode. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 2, 2010 Share Posted September 2, 2010 OK! after testing, its true transitional won't use :hover on other elements without the url ref. but since it is shown with url with a transitional declaration in w3schools, to say you must use strict for :hover to work properly on other elements is strict-ly untrue. Link to comment Share on other sites More sharing options...
jeffman Posted September 2, 2010 Share Posted September 2, 2010 I agree we seem to have learned something. Without realizing it, I for one was a little fuzzy on the relationships between quirks mode, almost standards mode, standards mode, and exactly which DTD's do what. I've done some more reading and think I have it nailed.It's just so darned easy (and good advice) to tell people to use a strict doctype. Explaining that there are 2 transitional DTD's, and which one leads to which behavior, could be a real chore.Not everyone reads the DTD tutorial on this site, and a lot of people paste the "other" transitional DTD (the one without the "loose" url) into their documents without realizing there is something else to think about.I think I will continue to recommend the strict doctype for :hover behavior, and if this improbable conversation comes up again, we will all be quicker to provide the more complete explanation.FWIW, there is a quick explanation here: https://developer.mozilla.org/en/Gecko%27s_...andards%22_Mode Link to comment Share on other sites More sharing options...
Ingolme Posted September 2, 2010 Share Posted September 2, 2010 I don't recommend the use of transitional DOCTYPE declarations because the W3C delcares that Transitional is only intended for backwards compatibility. It's for people who are "transitioning" to the new standards.It means that if you're redesigning an old site, it's OK to use Transitional, but if you're creating a new page from scratch you should be using Strict.As quoted from the W3C:http://www.w3.org/TR/html401/sgml/loosedtd.html This is the HTML 4.01 Transitional DTD, which includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. Authors should use the Strict DTD when possible, but may use the Transitional DTD when support for presentation attribute and elements is required. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.