width an component accounting quirks mode javascript?
i've scanning by renouned js libraries, nonetheless i can't extent duty dom component indeed accounts quirks mode internet explorer. emanate stuffing borders don't counted the extent quirks mode engaged. distant i tell happens doctype left out doctype set html 3.2.
obviously i only set doctype something standards compliant, nonetheless book embedded anywhere i don't have control over doctype.
to smack problem down smaller parts:
1) detect quirks mode?
2) what's best proceed mislay border stuffing an component compensate?
example prototype:
<html>
<head>
</head>
<body>
<div id="mydiv" style="width: 250px; pading-left: 1px; border: 2px black solid">hello</div>
<script>
alert($('mydiv').getwidth())
</script>
</body>
</html>
result:
253 (ff)
250 (ie)
thanks advance!
Comments
Post a Comment