Fit a DOM element into another