您的位置:首页 > 其它

设置input框文字垂直居中和宽度

2013-09-02 10:48 295 查看
input {
solid #999;height:22px;
background:#ffffff;
line-height:22px;
margin:0px; padding:0px;/*表单输入框内文字居中*/
vertical-align:middle;/*表单控件上下居中对齐*/}


设置input的宽度和高度

.input{ width:300px; height:18px; }


在input中调用该class,这个设置统一的宽度可以解决type=text和type=password长度不同的问题

<input class="input" type="text" name="gsmc" value='<%=gsmc%>' disabled="disabled"/>


其中disabled属性是设置该input为不可编辑

设置input无边框并且不可编辑

style="readonly:expression(this.readOnly=true);border:0px"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐