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

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

Redirect to a HTTPS version using .htaccess -