It's hard to explain, your answer is bold , the rest is context.
What is the logic in a static layout?
Span elements have a margin-left: 20px to stay separate from other span .
The row element has margin-left: -20px to ensure that the first span or any span placed in the "left column", is placed at the beginning of the container .
This works because the static row did not set its width , so margin-left: -20px does not set the width of the element, which continues to fill its ancestor.
What happens in a liquid layout?
We could try the same logic, but the difference is that the width and margin-left elements of the span defined as a percentage, so if we increase the actual width of the row element using a negative margin ), these span elements also increase its size, so they do not fit inside container .
So fluid layout uses a different method to achieve a similar result, simply applies margin-left: 0 to :first-child .
Digging deeper
And why not use the same strategy in both layouts? Of course, this will simplify the implementation, but the static technique (which is not applicable to the fluid) is more powerful. This is because any element that falls into the "left column", being :first-child or not, will become "corrected by brand." Static layouts need this behavior to comfortably provide responsiveness; fluid layouts can more or less be controlled without it.
albertedevigo
source share