Generalised logic to resize the fixed body header scrolling div