see the following example:
<script language="javascript" type="text/JavaScript">
function testPrecision() {
document.getElementById("test").style.left = "30.176283764px";
alert(document.getElementById("test").style.left);
}
</script>
<div id="test" style="left:20px; width:100px; height:100px; background-color:Red;" onclick="testPrecision();"></div>
why does the style number get rounded, and is there any way to avoid this?
Edit - to clarify: I'm not trying to display 0.1 of a pixel, I'm not that stupid :) The values are set on the server and represent very precise numbers in the data. It doesn't matter that they aren't displayed exactly, but the user can interact with the data clientside by manipulating various DOM elements, and I need to be able to retrieve these precise numbers on postback. I was hoping I could avoid rewriting the app to use lots of hidden fields instead, but it looks like maybe not.