Last active
December 15, 2015 18:59
-
-
Save electriccode/5308482 to your computer and use it in GitHub Desktop.
Custom CSS library
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
// Truncate a text. Override width to truncate to a specific width. | |
.trunc { | |
white-space:nowrap; | |
overflow:hidden; | |
text-overflow:ellipsis; | |
display:block; | |
width:100%; | |
} | |
// center align divs | |
.container { | |
margin:0 auto; | |
} | |
// Cross browser button code | |
.button { | |
position:relative; | |
overflow:hidden; | |
} | |
.button input { | |
position:absolute; | |
top:50%; | |
left:50%; | |
margin-top:-25em; | |
margin-left:-50em; | |
width:100em; | |
height:50em; | |
display:block; | |
-webkit-appearance:button; | |
cursor:pointer; | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; | |
/* IE 5-7 */ | |
filter: alpha(opacity=0); | |
/* Netscape */ | |
-moz-opacity: 0; | |
/* Safari 1.x */ | |
-khtml-opacity: 0; | |
/* Good browsers */ | |
opacity: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment