Skip to content

Instantly share code, notes, and snippets.

@sthembi
Created March 30, 2012 05:56
Show Gist options
  • Save sthembi/2247082 to your computer and use it in GitHub Desktop.
Save sthembi/2247082 to your computer and use it in GitHub Desktop.
example center blocks with display: inline block
/* example center blocks with display: inline block*/
#gallery-container {
width:900px;
border:1px solid red;
height:105px;
margin:0 auto
}
.thumb {
width:220px;
height:100px;
background-color:gray;
border:1px solid green;
/* float:left;
*/
display: inline-block;
}
.container1{
width:960px;
min-height:200px;
border:1px solid blue
/*margin:0 auto;
}
​<div class="container1">
<div id="gallery-container">
<div class="thumb"></div>
<div class="thumb"></div>
<div class="thumb"></div>
<div class="thumb"></div>
</div>
</div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
{"view":"separate","seethrough":"","prefixfree":"","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment