Skip to content Skip to sidebar Skip to footer

Force Browser To Ignore HTML 5 Features

I have a legacy website which renders correctly in FF 3.6, IE 7 to 8 etc but fails in FF 9. The issue is that an old (pre HTML 5) third party JS framework (Woodstock) used by the s

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"