I have a few divs aligned horizontally. How do I make the spacing between them automatic so that if I resize the screen or add another div, there will be equal spacing between d
Here you can find a solution with flexbox:
.container { display:flex; justify-content:space-between; } .item { background:#000; height:50px; width:120px; }
More information about using flexbox you can find here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/