centers string according to length of longest string