You aren't showing the code that presumably has a problem. You said nowhere that you had code that handles resize events and presumably moves your images. Why would you think we'd know that?
This code is the problem which is why i sent it