added some code for navbar resize