resize for element, window, and children