开发者

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

开发者 https://www.devze.com 2023-02-02 10:47 出处:网络
I am having issues with vertical alignment in firefox/chrome. For some reason my radio buttons are offset by a couple of pixel.

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/detai开发者_StackOverflowls_idea.php?itemid=36

(log in with try/me)


...
<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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号