add span classes and fix header to auto change size