Answer the question
In order to leave comments, you need to log in
Is it possible to style the block that is the last one in the line?
For example, there is a block, and it has several elements in a row. A certain margin is set between these elements on the right. When the screen is reduced, these elements one by one go to the next line. The last element, of course, should not have a margin. How to make it so that after the transition of the element to the next line, the margin was removed from the element that remained in the previous line last in place of the one that moved.
Here you can see a more specific example of what I'm trying to do.
Answer the question
In order to leave comments, you need to log in
Calculate.
Either JS.
Or count in your mind and set media and nth-child
Give the wrapper a negative right margin to compensate for the padding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question