setting image width to that of its parent