Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save djanix/2147572 to your computer and use it in GitHub Desktop.
Save djanix/2147572 to your computer and use it in GitHub Desktop.
css -> label and input vertical align
/*---------------------------------------------------------------------------
* 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;
}
/*---------------------------------------------------------------------------
* 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;
}
/*---------------------------------------------------------------------------
* 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