将复选框/收音机与标签对齐 [英] align checkbox/radio with label

查看:90
本文介绍了将复选框/收音机与标签对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我一直在网上寻找解决方案,但没有找到它。


我使用下面的css代码:


复选框:

hi

I''ve been searching the net for a solution, but did not find it.

I use following css code:

checkbox:

展开 | 选择 | Wrap | 行号

推荐答案

vertical-align通常可以做到这一点,所以你的html必须有不同的东西(这就是为什么我总是说在提问时提供两者 - 轻推,轻推,眨眼,眨眼)。


你做过''vertical-align:top''?
vertical-align usually does the trick so there must be something different about your html (which is why I always say to supply both when asking questions - nudge, nudge, wink, wink).

Did you do ''vertical-align:top''?


谢谢你的回复。

我确实尝试了垂直对齐,但它没有改变一件事。


完整的html:
thanks for the reply.

I did try vertical alignment, but it doesnt change a thing.

the complete html:
展开 | 选择 | Wrap | 行号


你错过了一个将IE引入怪癖模式的doctype。

A List Apart:文章:使用正确的DOCTYPE修复您的网站!


此外,您的html元素和属性应该是小写的(不是大写)。
You''re missing a doctype which will throw IE into quirks mode.

A List Apart: Articles: Fix Your Site With the Right DOCTYPE!

Also, your html elements and attributes should be lowercase (not UPPERCASE).


这篇关于将复选框/收音机与标签对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆