Force Browser To Ignore HTML 5 Features
Solution 1:
Browsers other than IE just implement one HTML (well, with the exception of quirks mode).
However all the hidden
attribute does is trigger some style rules in the UA stylesheet. You can add your own style rules to just override those. How complicated those rules need to be depends on what elements the framework adds the elements to, but one comprehensive approach would be to copy the various display
rules from the HTML5 spec or from http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css with the exception of the ones involving hidden
and just put them in a stylesheet that your page links to.
Solution 2:
Yes, you should be declaring the correct DOCTYPE. If it's truly HTML4, you should declare it as HTML4, not XHTML.
See http://www.w3.org/QA/2002/04/valid-dtd-list.html for the different types you can use.
Post a Comment for "Force Browser To Ignore HTML 5 Features"