Today I stumbled on a simple box styled as follow:
div.menubox {
background-color: #FFFFFF;
border: 1px solid #887777;
border-radius: 0 5px 5px 0;
box-shadow: 1px 1px 3px #998888;
font-family: Lato,sans serif;
font-size: 12px;
left: -5px;
margin-bottom: 2em;
min-height: 675px;
overflow: hidden;
padding: 25px 0 2em;
position: absolute;
top: 195px;
transition-duration: 0.5s;
transition-property: top;
width: 215px;
z-index: 99;
}
It contains an ul
and several li
. Nothing of exceptional until i ask to firebug to print in console the menubox height.
console.log(document.getElementById("menubox").offsetHeight)
returns an outstanding "677.2px".
It is the first time I step on such strange behaviour (I'm running firefox 17, with firebug 1.10.6, with a bunch of plugins, on an old windows XP installation).
It is a known issue of one of the component or a new "feature"?
ADDENDUM
Removing the border-shadow, border-radius css properties (disabled by via firebug) the result doesn't change.
chrome reports "649.5999755859375px" uhmm... need further investigation of the
underlying javascript code
EXTRA Ops, the javascript code was a dead line filling a variable, the true code is console.log(document.id("menubox").getStyle("height))` so mootools 1.4.5 is the main suspected (issuing manually the command on console return an integer pixel count) on both browser.
The question is still live, though, have you encountered a similar behaviour, there is a workaround (beside rounding manually the result)?