您的位置:首页 > 其它

(转)表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)

2011-09-09 10:16 501 查看
http://hi.baidu.com/allolee/blog/item/d2cd2ad327a4390f3af3cfd5.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>测试vertical-align</title>
<style>

label{vertical-align:middle}
.inputcheckbox{vertical-align:middle;}
body{font-family:tahoma;font-size:12px;}
</style>
</head>
<body>
<input class="inputcheckbox" name="test" value="1" type="checkbox"> <label>测试文字x</label> <br/><br/>
<input class="inputcheckbox " name="test2" value="2" type="radio"> <label>测试文字x</label> <br/><br/>
<input class="inputcheckbox " name="Text1" type="text" /> <label>文字</label>
<input class="inputcheckbox " name="Text1" type="text" /> <label>文字</label> <br/><br/>
<label>测试文字</label> <input class="inputcheckbox " name="Button1" type="button" value="按钮" /> <br/><br/>
<select class="inputcheckbox " name="Select1"> <option>测试文字</option> </select> <label>测试文字</label>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: