【问题标题】:Same css and HTML code but looking different on 2 pages相同的 css 和 HTML 代码,但在 2 页上看起来不同
【发布时间】:2013-12-07 00:41:23
【问题描述】:

我在 2 页上有以下 HTML 代码:

<form id="searchform" action="http://conelmorrofino.com/" method="get" role="search">
<div>
     <input id="s" type="text" name="s">
     <input id="searchsubmit" type="submit" value="">
 </div>
 </form>

以及以下 CSS:

#s {
background:#C5C6C8;
border:0;
border-radius:5px,0px,5px,0px !important;
margin-bottom:15px;
padding-left:10px;
padding-right:35px;
width:123px;
float:left;
-moz-border-radius:5px,0px,5px,0px !important;
-webkit-border-radius:5px,0px,5px,0px !important;
}
#searchsubmit {
background: url("images/search_icon.jpg") no-repeat scroll right center #C5C6C8;
border: medium none;
border-radius: 0 5px 5px 0;
cursor: pointer;
float: left;
height: 30px;
margin-top: 4px;
width: 22px;
}
input[type="text"] {
border-radius: 5px 0 0 5px;
height: 28px;
margin-top: 4px;
}

该表单在主页中具有完美的样式,而在其他页面上它看起来不正确和相同..它的宽度更小...而另一个更高..

实时示例 - 这是右侧边栏中的搜索字段:

首页 : http://conelmorrofino.com/ -- 这里看起来很完美

其他页面:http://conelmorrofino.com/mapa/ -- 搜索输入的宽度更小...

有什么问题吗?提前谢谢你们...

【问题讨论】:

    标签: javascript jquery html css


    【解决方案1】:

    你是对的,代码是一样的。发生这种情况时,我总是从修复错误开始:http://validator.w3.org/check?uri=http%3A%2F%2Fconelmorrofino.com%2Fmapa%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    现在它甚至还没有完成,所以在你修复你的 doctype 之后,你可能会发现一些更有启发性的东西。如果您仍然遇到问题,请在修复文档类型后报告。 (你只需要让它成为页面上的第一件事,现在它前面有一个换行符和空格)

    【讨论】:

    • 谢谢。文档类型是问题所在……我会为下一次写下你的建议。
    猜你喜欢
    • 2022-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-07
    • 2017-02-13
    • 1970-01-01
    • 2015-08-31
    相关资源
    最近更新 更多