0

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.

Mike Poole
  • 1,958
  • 5
  • 29
  • 41
  • See e.g. http://stackoverflow.com/questions/414891/whats-up-doctype and check out first your box layout (do you set height and width as *content* height and width?), then check out all the other things that may depend on Quirks vs. Standards mode, see http://www.cs.tut.fi/~jkorpela/quirks-mode.html – Jukka K. Korpela Feb 13 '13 at 14:50
  • Thanks Jukka. I have been checking the box layout for a few days and cannot see a problem with the sizes. I think the problem is that some of the CSS values (e.g. #mainLogo) from the stylesheet are not being recognised in the newer doctypes. If I paste the style into the head of the page it works for all the doctypes. Do you know why it won't be loading some of the styles from the stylesheet? – Mike Poole Feb 14 '13 at 11:57
  • 1
    I haven’t tried to debug your code, but there seems to be at least an issue with `mainLogo` vs. `mainlogo`. By the specs, `id` values are case-sensitive; in Quirks Mode, they might not be. – Jukka K. Korpela Feb 14 '13 at 13:24
  • Thanks Jukka, you're a star. That did the trick. – Mike Poole Feb 14 '13 at 14:20

1 Answers1

0

This was a case-sensitive issue.

Mike Poole
  • 1,958
  • 5
  • 29
  • 41