I have a general (dumb) question on creating items on the grid. What is the best way to control the horizontal space between div elements so that you don’t have uneven spacing on the right?
The top row of this image shows what I normally do which is add right margin to a div, which forces the right most element not to go to the edge of the grid.
The bottom row is adding a separate div element just for margin, which doesn’t seem like the right solution either.
What’s the best way to do this? Thanks for your help!
box3: margin-left: 5px; margin-right: 0px; (.box, .is-last) Simple: create box class for example “margin-right: 5px; margin-left:5px”
Than create “is-first” and “is-last” (to override “box” class)
by padding
You can create the same effect with padding. See her: