[英]Same css and HTML code but looking different on 2 pages
我在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;
}
表格在主頁和其他頁面上都有完美的風格,它看起來不正確..寬度較小......另一個更高......
實時exameples - 這是右側邊欄中的搜索字段:
主頁: http : //conelmorrofino.com/ - 這里看起來很完美
其他頁面: http : //conelmorrofino.com/mapa/ - 搜索輸入的寬度更小......
有什么不對? 提前謝謝你們......
你是對的,代碼是一樣的。 當發生這種情況時,我總是從修復錯誤開始: http : //validator.w3.org/check?uri = http%3A%2F%2Fconelmorrofino.com%2Fmapa%2F&charset =%28detect+automatically%29&doctype = Online&group = 0
現在它甚至沒有完成,所以在你修復你的doctype后,你可能會發現更具啟發性的東西。 如果您仍然遇到問題,請在修復doctype后立即報告。 (你只需要把它作為頁面上的第一件事,現在它之前有一個換行符和空格)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.