match margin size with calculation