文本框,button,label中文字上下居中方法
2018-03-19 09:45
218 查看
<html>
<head>
<style type='text/css'>
LABEL
{
LINE-HEIGHT: 20px;
HEIGHT: 20px
}
.button
{
font-size:12px;
text-align:center;
padding:0px;
vertical-align:middle ;
line-height:22px;
margin:0px;
Height:26px;
Width:60px;
}
.txt
{
border:1px #6699CC solid;
height:20px;
width:160px;
margin:0px;
vertical-align:middle;
font-size:12px;
padding:0px 2px;
line-height :16px;
}
</style>
</head>
<body>
div中文字,文本框,button按钮垂直居中对齐方法及的css样式。
<div class="divPad" style="FONT-SIZE: 12px; HEIGHT: 28px;">
<label>查询:企业名称</label><input ID="txt_company"
type="text" class="txt" />
<label>姓名</label><input ID="txt_name"
class="txt" Width="80px" type="text"/>
<input type="button" ID="Button1" value="查找"
class="button" /></div>
</body>
</html>
<head>
<style type='text/css'>
LABEL
{
LINE-HEIGHT: 20px;
HEIGHT: 20px
}
.button
{
font-size:12px;
text-align:center;
padding:0px;
vertical-align:middle ;
line-height:22px;
margin:0px;
Height:26px;
Width:60px;
}
.txt
{
border:1px #6699CC solid;
height:20px;
width:160px;
margin:0px;
vertical-align:middle;
font-size:12px;
padding:0px 2px;
line-height :16px;
}
</style>
</head>
<body>
div中文字,文本框,button按钮垂直居中对齐方法及的css样式。
<div class="divPad" style="FONT-SIZE: 12px; HEIGHT: 28px;">
<label>查询:企业名称</label><input ID="txt_company"
type="text" class="txt" />
<label>姓名</label><input ID="txt_name"
class="txt" Width="80px" type="text"/>
<input type="button" ID="Button1" value="查找"
class="button" /></div>
</body>
</html>
相关文章推荐
- 中文字,文本框,button按钮垂直居中对齐方法
- 中文字,文本框,button按钮垂直居中对齐方法
- 中文字,文本框,button按钮垂直居中对齐方法
- 用CSS让img input select button 图片,文本框,下拉菜单,按扭垂直居中的方法
- 图片自适应父元素大小,并左右上下居中的css方法
- jquery实现点击label的同时触发文本框点击事件的方法
- div中文字上下居中
- 用javascript实现input文本框只能输入中文的方法
- html和js图片上下居中的两种方法
- 解决移动端等比例图片上下左右居中的方法
- html中盒子上下左右居中方法汇总
- Android实现button居中的方法
- C# WinForm 中控件(Label,Button等) 文本自动换行 解决方法
- js实现键盘上下左右键选择文字并显示在文本框的方法
- jquery实现点击label的同时触发文本框点击事件的方法
- 自定义button-iOS设置button图片文字上下居中垂直对齐
- 控制DIV中文字绝对居中的简单方法
- qt button以及label实现不规则图形(五种方法:使用QSS,设置Mask图片,自己画)
- 让图片img标签在div里上下左右居中的方法
- 上下左右居中的方法总结