views:

43

answers:

3

Hi folks,

I read that if the DOCTYPE is not corectly set IE6 will enter Quirks mode.

I have given a document HTML 4.01 Transitional, but how do I know if IE6 triggers Quirks mode or not?

+1  A: 

If you look at the end of the address bar, there is a little "broken page" icon that shows whether you are in quirks mode, or "proper" mode!

You can also get this using JavaScript by querying...

alert(document.compatMode);
Sohnee
+1  A: 

Look at document.compatMode

<script type="text/javascript" charset="utf-8">
  if(document.compatMode == 'CSS1Compat'){
    alert("Standards mode");
  }else{
    alert("Quirks mode");
  }
</script>
Stuart Dunkeld
excellent thanks :)
RadiantHex
+2  A: 

create a bookmark with the following link:

javascript:m=(document.compatMode=='CSS+Compat')?'Standards.':'Quirks';window.alert('You are in ' + m + ' mode.');

z00bs