If you want the IMG in the child div to be 640px just get rid of :
#child img {
width: 100%;
}
other wise change #parent img to #parent>img also that way on the IMG inside #parent will be 640px and the image inside #child will be the natural dimension of that image.