Help with this please! keeping distance

How can i make two objects to keep the same distance in between them when i move one of those to another place?

Like in this site http://www.ciriljazbec.com/indexmain.php?xUrl=news , the frames keep the distance while the image are loading…

thanks for any help!!!