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

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?