Created
August 6, 2013 11:33
-
-
Save ultim8k/6163739 to your computer and use it in GitHub Desktop.
Responsive score table
This file contains hidden or 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
/** | |
* Responsive score table | |
*/ | |
.clearfix:before, | |
.clearfix:after { content: " "; display: table; } | |
.clearfix:after { clear: both; } | |
* { box-sizing: border-box; } | |
body { font-family: Helvetica; } | |
.score { text-align: center; } | |
.data-table { max-width:250px; margin:20px auto; } | |
.row { background-color: lightgray; border-bottom: 1px solid white; } | |
.score, .name { width: 50%; float:left; } | |
.data-left, .data-right { width:45%; float:left; background-color: gray; } | |
.spacer { width: 10%; float:left; text-align:center; } | |
.data-right .score { float: left; } | |
.data-left .score { float: right;} | |
.data-left .name { float: left; } | |
.data-right .name { float: right; text-align: right; } | |
@media (min-width: 480px) { | |
.mobile { display: none; } | |
} |
This file contains hidden or 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
<div class="data-table"> | |
<div class="row clearfix"> | |
<div class="data-left"> | |
<div class="name">Name</div><br class="mobile"/> | |
<input class="score" type="text"> | |
</div> | |
<div class="spacer">M</div> | |
<div class="data-right"> | |
<div class="name">Name</div><br class="mobile"/> | |
<input class="score" type="text"> | |
</div> | |
</div> | |
</div> |
This file contains hidden or 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 hidden or 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":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment