The best way I could describe what I want is with this picture:
How do I make it so the text aligns wi
It's pretty simple, just turn your label
element to display: block;
and use margin-left
for the label
and float
your radio button to the left
Demo
Demo 2 (Nothing fancy, just used multiple radio for the demonstration)
input[type=radio] {
float: left;
}
label {
margin-left: 30px;
display: block;
}
Just note that say if you are storing the radio with the labels in an li
element, something like
-
So make sure you self clear them by using something like
.radiolist li:after {
content: "";
clear: both;
display: table;
}
That will ensure that you are self clearing all the li
elements, and about the :after
psuedo, it is well supported in IE8 so nothing to worry about.