Hi I am very new to CSS.
I have this simple html page which I render in IE 11 standard mode:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<div>Test1</div>
<div style="padding-left: 31px; font-size: 9pt;">
<span style="color: #000000; font-family: Arial; font-size: 9pt;">
<span style="font-family: webdings;">=</span> Test2</span> </div>
<script language="JavaScript">
var divs = document.getElementsByTagName('div');
for(var i=0;i<divs.length;i++){
var offsetheight = divs[i].offsetHeight;
alert(offsetheight);
}
</script>
</BODY>
</HTML>
This HTML has 2 div elements. The JavaScript in the bottom of the page gets offset height of 2 divs. First Div Offset height is : 18 Second Div offset Height is : 14
If I render the same HTML in Quirks mode. I get different results:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
</HEAD>
<BODY>
<div>Test1</div>
<div style="padding-left: 31px; font-size: 9pt;">
<span style="color: #000000; font-family: Arial; font-size: 9pt;">
<span style="font-family: webdings;">=</span> Test2</span> </div>
<script language="JavaScript">
var divs = document.getElementsByTagName('div');
for(var i=0;i<divs.length;i++){
var offsetheight = divs[i].offsetHeight;
alert(offsetheight);
}
</script>
</BODY>
</HTML>
First Div Offset height is : 19 Second Div offset Height is : 19
I want to get offset height from quirks mode in standard mode(i.e. without adding a meta tag). May be through CSS. Let me know if it is possible?