navigation bar updated for shrinking window function