css - HTML Masonry Image layout -


i added wordpress theme new images post vertically instead of horizontal. new images display on green line instead of red line on image: image. great.

html:

<section> <img src="https://unsplash.it/700/345?image=564" /> <img src="https://unsplash.it/700/550?image=587" /> <img src="https://unsplash.it/700/450?image=589" /> <img src="https://unsplash.it/700/500?image=421" /> <img src="https://unsplash.it/700/300?image=455" /> <img src="https://unsplash.it/700/150?image=406" /> <img src="https://unsplash.it/700?image=594" /> <img src="https://unsplash.it/700/450?image=417" /> <img src="https://unsplash.it/700/400?image=410" /> <img src="https://unsplash.it/700/550?image=582" /> <img src="https://unsplash.it/700/175?image=591" /> <img src="https://unsplash.it/700/345?image=421" /> <img src="https://unsplash.it/700/567?image=572" /> <img src="https://unsplash.it/700/978?image=401" /> <img src="https://unsplash.it/700/654?image=388" /> <img src="https://unsplash.it/700/500?image=423" /> </section> 

css

section {      column-width: 300px;      column-gap: 5px;      padding: 5px; }  section img {      width: 100%;  } 

please use masonry layout.

 article {        -moz-column-width: 13em;   -webkit-column-width: 13em;   -moz-column-gap: 1em;   -webkit-column-gap: 1em;   }    section {       width: 100%;        display: inline-block;  }
<article>  <section>  <img src="https://unsplash.it/700/345?image=564" />  </section>  <section>  <img src="https://unsplash.it/700/550?image=587" />  </section>  <section>  <img src="https://unsplash.it/700/450?image=589" />  </section>  <section>  <img src="https://unsplash.it/700/500?image=421" />  </section>  <section>  <img src="https://unsplash.it/700/300?image=455" />  </section>  <section>  <img src="https://unsplash.it/700/150?image=406" />  </section>  <section>  <img src="https://unsplash.it/700?image=594" />  </section>  <section>  <img src="https://unsplash.it/700/450?image=417" />  </section>  <section>  <img src="https://unsplash.it/700/400?image=410" />  </section>  <section>  <img src="https://unsplash.it/700/550?image=582" />  </section>  <section>  <img src="https://unsplash.it/700/175?image=591" />  </section>  <section>  <img src="https://unsplash.it/700/345?image=421" />  </section>  <section>  <img src="https://unsplash.it/700/567?image=572" />  </section>  <section>  <img src="https://unsplash.it/700/978?image=401" />  </section>  <section>  <img src="https://unsplash.it/700/654?image=388" />  </section>  <section>  <img src="https://unsplash.it/700/500?image=423" />  </section>  </article>


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -