I wanted to summarise the findings from this question.
To switch off compatibility mode in IE9
- in IE 9 right click tools icon and select command bar
- from command bar select tools
- from tools select Compatibility View Settings
- uncheck display intranet site in compatibility mode
- from command bar select tools ensure compatibility view is unchecked
- Restart Browser
Main points for changing code
- The html 5 doctype simplifies the whole issue of setting a doctype.
- The reason that there appeared to be a relationship between charset and quirksmode was the error in the meta to add that charset which put it in conflict with the doctype.
So actions completed to resolve problem.
- Ignore localhost quirksmode - this is only significant when testing.
Use
<!Doctype html>
ensuring that the html document commences with this. N:B this does not mean that this has to be the first line of the HTML. php includes can precede it.In the
<head>
Use<meta charset="UTF-8">
- In php initialize use
<?php header("content-Type: text/html; charset=utf-8"); ?>