Dynamic header resizing