I have a gallery of images, each of which has the same width and height, say 10 pixels. I want them spaced so that there are 5 lines, and they seem 5px apart on all sides. The div container is indented 5px. There are a few lines!
My problem is that if I give each image the left edge of 5px, then either:
a) The size of the container corresponds to the size, and therefore only 4 images fit in a row, since the fifth marker shunts it on the next line.
b) The div container has an extra 5px, which leads to an increase in the space at the end of each line.
How can I style my images so that they all match the correct line and without any ugly spaces without changing the contents of the container ?
source
share