我有这个page如果您查看右上角的搜索...我需要将文本搜索移动大约 2px 以使其与图像居中但是我的文本对齐垂直对齐或填充没有做我想要的这是我的 css
#Search {
background: url("/images/no-letters-search.png") no-repeat scroll 0 0 transparent;
border: medium none;
font-size: 15px;
height: 37px;
left: 31px;
padding-left: 26px;
position: relative;
top: -3px;
width: 175px;
font-family: Helvetica, sans-serif;
}
这是我的html
<form id="search_form" method="post" action="/mm5/merchant.mvc?">
<input type="text" name="Search" id="Search" tabindex="0" />
<input name="Screen" type="hidden" value="SRCH" />
</form>
最佳答案
嗯,试试 line-height:18px;
- 也许可以。
关于html - 将文本向上移动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5558526/