本文介绍了居中文字控制输入文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将以下CSS应用于我的网页,但是textbox控件中的文本与标签上的文本不对齐.
Hi, I''ve the following CSS applied to my web page but the text within the textbox control is not aligning to the text on the label.
.formArea{
float: left;
width: 939px;
}
.formArea td.label{
float: left;
width:146px;
margin-bottom:10px;
margin-top:6px;
text-align: right;
}
.formArea td.nonEdit{
height:30px;
padding-right:10px;
}
.formArea td.labelwide{
float: left;
width:230px;
margin-bottom:10px;
margin-top:6px;
}
.formArea td.labelmid{
float: left;
width:180px;
margin-bottom:10px;
margin-top:6px;
}.formArea td.labelmid{
float: left;
width:190px;
margin-bottom:10px;
margin-top:6px;
}
.formArea td.labelshort{
float: right;
width:110px;
margin-bottom:10px;
margin-top:6px;
}
.formArea td.labelshortLFT{
float: left;
width:90px;
margin-bottom:10px;
margin-top:6px;
}
.formArea td.Label_Red_Bold
{
font-weight: bold;
color: Red;
}
.formArea td.Label_Green_Bold
{
font-weight: bold;
color: Green;
}
.formArea td.control{
width:310px;
margin-bottom:10px;
vertical-align:middle;
}
.formArea td.controlmed{
width:200px;
margin-bottom:10px;
vertical-align:middle;
}
.formArea td.buttons{
padding-left:10px;
padding-right:10px;
vertical-align:middle;
}
.formArea td label{
float: left;
margin-top:8px;
color:#000;
}
.formArea td.labelbold label{
font-weight:bold;
}
.formArea td.labelshort label{
float: right;
margin-top:8px;
margin-right:10px;
color:#000;
}
.formArea td input[type=text],input[type=password],textarea{
float: left;
border:#92d307 solid 1px;
line-height:20px;
font-family:Arial, Helvetica, sans-serif;
padding:5px;
color:#000000;
vertical-align:middle;
}
.formArea td input[type=radio]
{
float: left;
margin:8px 20px 0px 8px;
}
有人可以帮我将文本框文本与vertical-alin:middle对齐到控件的中心吗?似乎没有用.
谢谢
Can someone please help me to align the textbox text to the center of the control as vertical-alin:middle; doesn''t seem to be working.
Thanks
推荐答案
这篇关于居中文字控制输入文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!