2016-10-28 45 views
0

所以,我在我的網站上使用了這個代碼片段:http://bootsnipp.com/snippets/featured/inline-navbar-search 但是它看起來並不像預期的那樣工作正如您在圖片中看到的,當我單擊搜索圖標時,整個搜索盒子放在品牌標誌左側。 我看到這段代碼是用於bootstrap 3.1.0的我怎樣才能使它像bootstrap 3.3.7的代碼片段一樣工作?引導程序片段搜索框不能正常工作

enter image description here

+0

顯示你的HTML和CSS代碼,以便更好地理解問題。 – tejashsoni111

+0

與該片段完全相同的代碼。 – Danelo

+0

是的,但是,您的網站和演示代碼段的CSS可能存在衝突。所以沒有看到你的網站的HTML和CSS代碼,沒有人可以追查這個問題。 – tejashsoni111

回答

1

嘗試用塊添加

text-align: right 

,如:

header .navbar-collapse form[role="search"] { 
    position: absolute; 
    top: 0; 
    right: 0; 
    width: 100%; 
    padding: 0; 
    margin: 0; 
    color: #D04746 !important; 
    z-index: 0; 
    text-align: right; 
} 
+0

謝謝,先生! – Danelo