ASP.net RadioButtons Text Align

Want to know how to Align you RadioButton List text so that it is in line with the button image?

Create a css file and reference it in the head:

 

 

< link rel=”stylesheet” type=”text/css” href=”media/css/reset-fonts-grids.css”>

 

 

 

Put this in a css file:

/* ——————————————-
* Flow Layout List
* RadioButtonList RepeatLayout=”Flow”
  ——————————————- */
.flowLayoutList
{
display: block;
height: 25px;
}
.flowLayoutList INPUT,
.flowLayoutList LABEL
{
line-height: 20px;
vertical-align: middle;
}
.flowLayoutList INPUT[type=”radio”]
{
float: left;
    width: 20px;
    padding: 0;
    vertical-align: middle;     }

.flowLayoutList LABEL
{
clear: right;
margin-right: 4px;   white-space: nowrap;
}

 

Set CSSClass on the Radiobutton list to: flowLayoutList

And you text will vertically align!

JD

Leave a comment

You must be logged in to post a comment.