views:

334

answers:

1

hey,

i have a div and and a looping move function that translates an image by 1px within the div. The width of the div is 400px; the image starts moving from right to left, but I can't figure out how to make it start appearing from behind the div border. Currently if I set a starting x-position at 405px and finishing x-position at -5 the image simply starts moving in front of the div. How do I make it so when it starts moving at 405 but only becomes visible once it crosses the div border at 400px?

thanks

+2  A: 

Use overflow: hidden; on the div and give it a width of 400px.

Tatu Ulmanen