ThomPete
ThomPete

Reputation: 155

How do I fix vertical label/radio alignment om css?

I am having issues with vertical alignment in firefox/chrome.

For some reason my radio buttons are offset by a couple of pixel.

I can make one of them align but the other will miss-align accordingly

http://www.blueskycouncil.com/details_idea.php?itemid=36

(log in with try/me)

Upvotes: 2

Views: 5019

Answers (1)

MatTheCat
MatTheCat

Reputation: 18721

...
<li>
    <label>test</label>
    <input type="radio" />
</li>
...

label,input {
    vertical-align:middle;
}
label {
    display:inline; /* display:block; and float:left; are useless */
    margin:0 5px 0 0; /* same for margin-top */
}
input {
    height:auto;
}

It should align label and input in most cases.

Upvotes: 5

Related Questions