Just thought I would post a couple of examples of confusing info to me:
http://forum.mootools.net/viewtopic.php?id=1673&p=3#post-21696
A couple of things. First - and this may or may not be related to you problem - use a Strict doctype. Never use a Transitional doctype. Let me explain way:
The Transitional DTD includes everything in the Strict DTD plus deprecated elements and attributes: Transitional DTD = Quirks mode while Strict DTD = Strict mode. Quirks mode and strict mode are the two ‘modes’ modern browsers use to interpret CSS (visual layout or styles). Documents with Transitional DOCTYPEs (or no DOCTYPE at all) are displayed using the “quirks” mode. This mode emulates legacy bugs and behaviors of version 4 browsers. Documents with Strict DOCTYPEs are displayed using the “strict” mode. This mode follows W3C specifications as closely as possible.
When Netscape 4 and Explorer 4 implemented CSS, their support did not match the W3C standard (or each other). To make sure that their websites rendered correctly in the various browsers, web developers had to implement CSS according to the wishes of these browsers against the W3C specifications (remember “This website is optimized for Netscape 4”). When standards compliancy became important browser vendors faced a tough choice. They had to:
- Allow web developers who knew their standards to choose which mode to use. - Continue displaying old pages according to the old (quirks) rules.
In other words, all browsers needed two modes: quirks mode for the old rules, strict mode for the standard. Choosing which mode to use requires a trigger, and this trigger was found in ‘doctype switching’ (AKA Transitional vs Strict).
[End XHTML Lesson]
A lot of Web Standards books will recommend that you begin coding with Transitional and when you are more comfortable with the syntax rules can move to Strict. That assumes that you 1) Code your pages for only 1 browser and 2) Code complete garbage. Since that is rarely the case that is bad information. If you code in Transitional your pages will look different in every browser as they attempt to emulate legacy behaviour and you will go crazy writing hacks. Code in Strict and you can actually debug your pages effectively.
Anyway, right the second thing, it looks like you have a syntax error on line 13 of your HTML: it looks like the trailing “,” after “type: ‘fade’” (Firebug throws this warning: trailing comma is not legal in ECMA-262 object initializers).
And:
http://stickmanlabs.com/lightwindow/
Your DOCTYPE, just use STRICT or TRANSITIONAL, anything else is just lazy. I have no intention of making this thing work any other way, that would be promoting what I think is bad CSS.
(Note: I think the above folks are refering to XHTML DTD’s and not HTML 4.01 strict DTD’s???)
The lightwindow site fails validation horribly… He also uses custom attributes for certain elements (“caption=” and “params=” within the A tag)… the author says:
As for the custom attributes, xhtml is xml, if you need it validate you can allways add your own dtd based off of your normal doctype and then you would be fine.
Seems like all these Ajax coders prefer the strict XHTML DTD’s… why? Will the code not work as HTML 4.01 strict?
Arrrrrrgh!!!
Lol, ok… sorry… had to vent.
Cheers,
Micky