98
rated 0 times
[
100]
[
2]
/ answers: 1 / hits: 65421
/ 13 Years ago, sun, november 6, 2011, 12:00:00
I have a div tag declared like this:
<div id=carRight style=position:absolute; left:600px; top:170px;>
<img src=carRight.png width=256 height=256 />
</div>
After a quick animation, I'd like to move the left position when a button is pressed. I tried a few variations of this, but it doesn't seem to be correct:
document.getElementById('carRight').style.left=600;
document.getElementById('carRight').style.position.left=600;
What is the correct statement to use? Thanks.
More From » javascript