html - Align Images (without columns) so that the new row starts at the most upper possible position -


i want align multiple images / boxes in follwoing way:

... <img  width="200"   src="http://www.passmark.com/images/monitortestscreenshot5.gif" />  <img  width="250"   src="http://www.passmark.com/images/monitortestscreenshot5.gif" /> ... 

fiddle: https://jsfiddle.net/1eaxc7kr/2/

my problem shown fiddle is, new elements in second row should not have margin upper element if not need to.

for example first image of second row (might depend on screen width) should directly below first element of first row.

i tried using flexboxes somehow failed on finding way.

here's tried:

img {   vertical-align: top;   display: inline-flex; }   .container {   align-items: flex-start; } 


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -