Search code examples
htmlcssvalidationdoctype

Changing Doctype Breaks Page Styles


We have been using the HTML 4 Transitional (half) doctype on our sites and I am in the process of testing more up to date doctypes before upgrading our sites.

I have created a test page here (link subsequently removed as cause was not specific to this example).

The current doctype displays the page okay but as you can see the styles that we are using break the page (e.g. search box and top menu jumps to above logo) if any of the other doctypes are used. It is almost as if some of the style selectors are no longer being used.

I am guessing this may be caused by floating divs (e.g. #logo and #topRight). I have tried to clear those but it has not solved the problems.

The page validates in HTML 4 Strict, XHTML 1 Strict, HTML 5 and CSS 3 with no errors (with exception of "/" errors in XHTML because content is still HTML).

Does anyone know why the page is breaking with the newer doctypes? Thanks for any suggestions.


Solution

  • This was a case-sensitive issue.