Last active
March 28, 2016 07:58
-
-
Save ron4stoppable/872963ffd876e52e1721 to your computer and use it in GitHub Desktop.
center div with box model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* center div with box model | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
.row{ | |
width:100%; | |
/* Firefox */ | |
display:-moz-box; | |
-moz-box-pack:center; | |
-moz-box-align:center; | |
/* Safari and Chrome */ | |
display:-webkit-box; | |
-webkit-box-pack:center; | |
-webkit-box-align:center; | |
/* W3C */ | |
display:box; | |
box-pack:center; | |
box-align:center;} | |
.cols{ | |
width: 25%; | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100% | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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