I want to make same spacing between all pictures. Their width would be the same only height differs. It should look like in the picture. example: http://prntscr.com/2ugt3z
Asked
Active
Viewed 50 times
2 Answers
0
do you mean something like, this will place margin of 5px on every image tag inside #content:
#content img{
margin: 5px;
}
or make:
.image-margin{
margin: 5px;
}
and do something like:

RunnicFusion
- 193
- 1
- 3
- 12
-
yes, that is right because some pictures are larger. What if you uses float: left; ? – RunnicFusion Feb 21 '14 at 13:09
0
That kind of layout cannot be done using only floats, your options are:
- Use Flex layout (ie10+)
- Position each element manually
- Use a plugin, if you are using jquery then Isotope (http://isotope.metafizzy.co/) or Masonry (http://masonry.desandro.com/) are what you need, if you're using pure javascript, Salvattore (http://salvattore.com/) will do the trick.

rampaign
- 66
- 2
- 6