Skip to content

Instantly share code, notes, and snippets.

@jmac-slash0
Last active December 21, 2015 18:19
Embed
What would you like to do?
A straightforward, simple centered image in a "block" example. You can just put a bunch of these galleryBlock divs next to each other in a wrapper div and they should space out and look OK.
<style>
.galleryBlock {
<!-- Fitment -->
height: 214px;
width: 214px;
line-height: 214px;
text-align: center;
margin: 10px;
display: inline-block;
<!-- Style -->
background: none repeat scroll 0 0 #F5F5F5;
border: 1px solid #DDDDDD;
border-radius: 5px;
}
.galleryBlock img {
max-height: 200px;
max-width: 200px;
vertical-align: middle;
}
</style>
<div class="galleryBlock">
<a href="http://imgur.com/gallery/7KbkTlr">
<img src="http://i.imgur.com/7KbkTlr.jpg"/>
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment