简体   繁体   English

HTML文字无法正确对齐

[英]HTML text not aligning properly

I have a textbox and when I enter the term "laptop" its not visible properly. 我有一个文本框,当我输入术语“笔记本电脑”时,它无法正确显示。 The problem is in IE9, not with Chrome. 问题出在IE9,而不是Chrome。

在此处输入图片说明

HTML HTML

<input id="small_search_string_sub" name="search_string" type="text" class="newsearch_sub rounded " placeholder="Search..." maxlength="500">

Here is the CSS:- 这是CSS:-

.newsearch_sub {
padding: 3px 10px 3px 10px;
background-color: #FFF;
width: 220px;
height: 25px;
margin-top: 10px;
vertical-align: top;
}

It seems like you have no reset for the input default style, also the input has not format for the text on it, also the padding might be pushing down the text to far. 似乎您没有重置输入默认样式,输入也没有为其上的文本设置格式,填充也可能将文本推到很远。

I tried this, and it seems to work well on IE9 for me, but the fact that I see another class (rounded) on the line of code that you send, makes me wonder if there is not something missing here, can you put a link to the code, even as a stand alone page, this way I can debug on ie9 on the proper code, and maybe give you a solution if this one does not work for you. 我尝试了这一点,它似乎对我来说在IE9上运行良好,但是我在发送的代码行上看到另一个类(四舍五入),这一事实使我想知道这里是否没有遗漏的东西,您能否放置一个链接到代码,甚至作为独立页面,也可以通过这种方式在适当的代码上对ie9进行调试,如果此代码不适合您,则可以为您提供解决方案。

.newsearch_sub {
     padding: 3px 10px 3px 10px;
     background-color: #FFF;
     width: 220px;
     height: 25px;
     margin-top: 10px;
     vertical-align: top;
     font:12px/24px Arial,Helvetica
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM