Custom navbar auto resize