update container position on resize