I inherited a website here where some of the pages are valid html5 and some are xhtml transitional. It is OK to leave them like that or should they all be one doctype. I'm running into a LOT of ugly anomalies on IE9 and I'm wondering if the multiple doctypes are causing them.
TIA your input.
Your index page seems to be using HTML 4 Strict although the DOCTYPE on that page is incomplete. See here for a list of DOCTYPE usages.
As for the other pages being in HTML5, the DOCTYPE says so but there are no HTML5 tags so there shouldn't be much of an issue. You said you are finding a lot of "ugly anomalies". Can you explain this further and maybe direct us to one of the problem pages? I briefly checked 2 pages in IE9 and they seem to look similar to that of Chrome on OSX.
But yes, it is normally good practice to have all pages of the site in the one DOCTYPE. Normally this is never an issue as the site is built either using a template or includes for that section of the document which keeps everything consistent.
Thanks for the reply Rik -
I'm surprised that the index page's DOCTYPE is incomplete.... It was made by HTML Tidy at the W3C's HTML validation page.
As far as the anamolies the 2 big ones are:
1-The videos on the home page and the video gallery would not launch. I'm guessing there was a problem with fancy-box jquery but it is an issue exclusive to IE.
2-If you looked at the home page and didn't see this one then join the club (only 2 Win7 IE-using members of the LVA Board saw it) - all of the images that make up the slide show are displayed at once - stacked down the page oblitherating the rest of the content.
If you bounce around the site (especially to this page and then back to the home page - that's when things start to get shakey. Page loads slow down and more. That's when I started to suspect the DOCTYPE.
What about compatibility mode? Since that's an IE exclusive meta - maybe that's causing problems because it's being misused. Do I want to use that at all? How should I use it? (it's very confusing).
Thanks for your input.
In general, the pages could do with a lot of tidying up and consistent scripts/css/DOCTYPES on each page. All CSS should be at the top of the page. All JS generally at the bottom but in order - jquery, then jquery ui first and the rest follow. Your direct script actions should always be last on the page (the $(".fancybox").fancybox() etc) but before the ending </body></html>
Also, try removing the comments from your compatibility meta tag:
<!--<meta http-equiv="X-UA-Compatible" content="IE=9">-->