Skip to content

Instantly share code, notes, and snippets.

@ron4stoppable
Last active March 28, 2016 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ron4stoppable/ff6371381f10ca85306e to your computer and use it in GitHub Desktop.
Save ron4stoppable/ff6371381f10ca85306e to your computer and use it in GitHub Desktop.
Center with inline block
/**
* Center with inline block
*/
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
.row{
width: 100%;
text-align: center;
}
.cols{
/* margin: 0 auto; */
display: inline-block;
padding: 50px;
/* width: 100px; */
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%
}
<!-- content to be placed inside <body>…</body> -->
<div class="row">
<div class="cols"><i class="fa fa-reddit-alien"></i><p> Reddit </p></div>
<div class="cols"><i class="fa fa-car"></i><p>Car</p></div>
</div>
// alert('Hello world!');
{"view":"separate","fontsize":"100","seethrough":"1","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment