hide and show when the size of window changes