Created
March 21, 2012 14:38
-
-
Save djanix/2147572 to your computer and use it in GitHub Desktop.
css -> label and input vertical align
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
/*--------------------------------------------------------------------------- | |
* Label + input display fix | |
* Put the input + text inside the label to make it works correctly | |
*--------------------------------------------------------------------------*/ | |
label { | |
display: block; | |
padding-left: 15px; | |
text-indent: -15px; | |
} | |
input { | |
width: 13px; | |
height: 13px; | |
padding: 0; | |
margin: 0; | |
vertical-align: bottom; | |
position: relative; | |
top: -1px; | |
*overflow: hidden; | |
} |
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
/*--------------------------------------------------------------------------- | |
* Label + input display fix | |
* Put the input + text inside the label to make it works correctly | |
*--------------------------------------------------------------------------*/ | |
label { | |
display: block; | |
padding-left: 15px; | |
text-indent: -15px; | |
} | |
input { | |
width: 13px; | |
height: 13px; | |
padding: 0; | |
margin: 0; | |
vertical-align: bottom; | |
position: relative; | |
top: -1px; | |
*overflow: hidden; | |
} |
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
/*--------------------------------------------------------------------------- | |
* Label + input display fix | |
* Put the input + text inside the label to make it works correctly | |
*--------------------------------------------------------------------------*/ | |
label { | |
display: block; | |
padding-left: 15px; | |
text-indent: -15px; | |
} | |
input { | |
width: 13px; | |
height: 13px; | |
padding: 0; | |
margin: 0; | |
vertical-align: bottom; | |
position: relative; | |
top: -1px; | |
*overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment