Forum Moderators: not2easy
The default document mode appears to be IE7Thanks for that penders - that was the report the first time it loaded, but I thought it was me having messed with my settings earlier.
<!--[if IE 7]>
<link rel=”stylesheet” type=”text/css”
href=”someFileName.css”>
<![endif]–> Yes. Search on "conditional comment" as already suggested, and the page I mentioned - at quirksmode - will be near the top. That has a good explanation and examples of how they work. However, I note the example is a link to stylesheet - presumably one for ie. That sounds easy, but it will block all other downloads until complete. So if it is necessary to send to ie, I would use the conditional comment to send the styles rather than link to a separate file.
<!--[if IE 7]>
<link rel=”stylesheet” type=”text/css”
href=”someFileName.css”>
<![endif]–>
Can I do the same for 5 and 6, by simply changing the number?
var IE = /*@cc_on!@*/false;
if (!IE) { return; }
if (document.compatMode && document.compatMode == 'BackCompat') {
if (document.getElementById("af-form-826551486")) {
document.getElementById("af-form-826551486").className = 'af-form af-quirksMode';
}
:
alt131... I'd suggest trying to find out why it is switching [from IE8 to IE7 standards]. One thing that will trigger a switch is recovering from errors - validate your code and see if that removes the issue.
Must admit to being very interested to know what is triggering IE8 to display using IE7 standards, since if it used IE8 standards it would seem to be fine. Your conditional comment only needs to target IE7 and below for this reason.Penders, I agree, and that is the interesting part of this code problem. Also, there are issues with ie8 in ie7 mode which aren't corrected by a conditional comment for ie7, while sending adjustments for ie8 also changes the rendering for ie8 in ie8 mode - which may render the form unusable for those users. jmacjm pleased you have a "fix" via conditional comments - but this is the reason penders and I are concerned about the document "switching " between modes.
<meta http-equiv="X-UA-Compatible" content="IE=edge">
just remove the server configuration instead.