Skip to content

Instantly share code, notes, and snippets.

@oleksapro
Created June 24, 2015 14:17
Show Gist options
  • Save oleksapro/5bd0a9d0acccea302d2f to your computer and use it in GitHub Desktop.
Save oleksapro/5bd0a9d0acccea302d2f to your computer and use it in GitHub Desktop.
/* http://stackoverflow.com/questions/1464934/text-align-justify-and-images */
<style>
.justify-image{ text-align: justify;}
.justify-image img{display:inline-block;}
.justify-image:after{content:""; display: inline-block; width: 100%; height: 0;}
</style>
<p class="justify-image">
<img src="/path/img.jpg" alt="my image">
<img src="/path/img.jpg" alt="my image">
<img src="/path/img.jpg" alt="my image">
<img src="/path/img.jpg" alt="my image">
<img src="/path/img.jpg" alt="my image">
<img src="/path/img.jpg" alt="my image">
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment