(转)表单元素与提示文字无法对齐的问题(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>
<!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>
相关文章推荐
- 表单元素与提示文字无法对齐的问题(input,radio,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的解决方法(input,checkbox文字对齐)
- 表单元素与提示文字无法对齐的问题
- 表单元素input、按钮、文字完美垂直居中对齐方法
- input、select等表单元素的对齐问题
- checkbox与说明文字无法对齐的问题
- checkbox与说明文字无法对齐的问题
- checkbox与旁侧说明文字无法对齐的问题
- 表单元素input、按钮、文字完美垂直居中对齐方法
- checkbox与说明文字无法对齐的问题
- 表单元素input等在IE下错位不能对齐问题——解决方案
- checkbox与说明文字无法对齐的问题
- 表单元素input、按钮、文字完美垂直居中对齐方法
- 表单元素和文字垂直居中对齐的问题
- extjs设置表单元素为disable后表单无法提交参数到后台的问题