ah I see. Thanks for the reply!
With your explanation, I figured out I can grab each segment x size, subtract it from the size of the biggest segment, divide it by 2 and add it as left and right padding to other segments. Seems to be working!
Is there a way to automatically detect dimension of the biggest segment?