【问题标题】:Text Input Box misaligned in chromechrome中的文本输入框未对齐
【发布时间】:2014-09-09 09:30:24
【问题描述】:

我在所有浏览器中对齐输入文本字段和密码文本字段时遇到问题。有什么解决办法吗?

这是我定义文本框的代码

<input cssClass="ui-widget ui-corner-all required" id="username" size="50" tabindex="1" path="username" autocomplete="false" htmlEscape="true" cssStyle="height:30px;padding-left: 3px;"/>

现在文本输入字段在 IE 和 firefox 中工作正常,但它从 chrome 中的 div 中流出......有什么解决方法吗?

【问题讨论】:

  • 问题似乎是你没有代码。你不需要做任何工作,你只需要做工作..
  • 代码 sn-p 没有缩进,现在已修复,各位放心!
  • 我们需要更多的 HTML ... div 在哪里?另外,cssClasscssStyle 来自哪里?

标签: javascript html css google-chrome


【解决方案1】:

您需要确保在 CSS 声明中将输入字段的宽度设置为 100% 或更小,因此它的大小与容器 div 相关。

此外,您的 HTML 代码在调用类时会出现一些错误。应该是这样的:

<input class="ui-widget ui-corner-all required" id="username" size="50" tabindex="1" autocomplete="false" style="height:30px;padding-left:3px;" />

另外,pathhtmlEscape 不是输入标签的有效属性 - 请参阅此处:http://www.w3schools.com/tags/tag_input.asp

【讨论】:

    猜你喜欢
    • 2014-09-14
    • 2011-07-09
    • 2010-11-28
    • 2014-01-10
    • 2016-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多