2013-06-26 41 views
-1

我禁用了IE上的搜索框,因爲IE始終將其置於導航上。 它適用於Chrome,我不確定歌劇(我不確定我是否在意),但它不適用於Firefox。易用性計時在Firefox中起作用,但沒有其他功能可行。搜索框/轉換在Firefox中不起作用

我試過其他的東西來解決這個問題,但每次我嘗試不同的東西時,搜索框的位置就會被拋棄。

如果你在Firefox中查看它,它看起來很好 - 直到你點擊它來搜索。 http://kissoff.weebly.com/你可以看到搜索框應該做什麼,如果你看它並在Chrome中點擊它。

我敢肯定,定位是關閉的,我不知道(我是新來的CSS)。任何幫助表示讚賞。 #search {}

#search input[type="text"] { 
background: url(search-white.png) no-repeat 10px 6px #fcfcfc; 
border: 1px solid #d1d1d1; 
position: fixed; 
margin-left: 350px; 
margin-right: 0px; 
margin-top: 0px; 
color: #bebebe; 
width: 150px; 
padding: 6px 15px 6px 35px; 
-webkit-border-radius: 20px; 
-moz-border-radius: 20px; 
border-radius: 20px; 
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); 
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
-webkit-transition: all 0.7s ease 0s; 
-moz-transition: all 0.7s ease 0s; 
-o-transition: all 0.7s ease 0s; 
transition: all 0.7s ease 0s; 
float: right; 
} 
#search input[type="text"]:focus { 
width: 200px; 
} 
+1

這是一個有點奇怪使用'位置:fixed'和'float'在一起。 – icktoofay

+0

@ user2522488下面是我的answer.Check它out.try解釋問題,而不是生成的意見。 –

回答

0

你忘了編輯頁邊空白。 http://jsfiddle.net/xeemez/nZBNm/

#search{ 
background: url(search-white.png) no-repeat 10px 6px #fcfcfc; 
border: 1px solid #d1d1d1; 
position: fixed; 
margin-left: 350px; 
margin-right: 0px; 
margin-top: 0px; 
color: #bebebe; 
width: 15px; 
padding: 6px 15px 6px 35px; 
-webkit-border-radius: 20px; 
-moz-border-radius: 20px; 
border-radius: 20px; 
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); 
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; 
-webkit-transition: all 0.7s ease 0s; 
-moz-transition: all 0.7s ease 0s; 
-o-transition: all 0.7s ease 0s; 
transition: all 0.7s ease 0s; 
float: right; 

} 
#search:focus { 
width: 200px; 
margin-left: 200px; 
} 

http://jsfiddle.net/xeemez/nZBNm/