How to impose such a block?full width + padding, no padding around the edges of the block?

https://codepen.io/poylar/pen/NWGNBep

Need to between the blocks were indented, but the edges are pressed to the edge of the screen/wrapper.

I do always using nth-child and reset left and right margin let's say 3 of each item(If line 3 element) and each of the first left margin, but I think it's like that too. Maybe there is a simpler option?
April 19th 20 at 12:32
2 answers
April 19th 20 at 12:34
Remove the wrapper specifies the width (it's a block element, and so he takes all the available width) and add a negative margin left and right margin equal elements. Vzhuh. It is a normal practice.



The alternative is to use grids or to practice your method, but it is not necessary to write hands, there are specialized tools for this.
Styles get excessive (although, in General, is not much more than hands to write), but it works and reinforced concrete in terms of a DX great.
April 19th 20 at 12:36

Find more questions by tags HTMLCSS