2017-03-07 136 views
-1

我添加了一個搜索菜單在WordPress的HTML的header.php:CSS工作但不是Chrome瀏覽器

<!-- Collect the nav links, forms, and other content for toggling --> 
        <?php 
        // Main menu 
        echo $primary_menu; 
        ?> 
        <div id="search"><?php get_search_form();?></div> 
          </div><!--end container--> 

我加<div id="search"><?php get_search_form();?></div>現有的模板。

我已經取得了一些風格的改變,搜索菜單:.input-group .form-control {height:36px !important;}

這些變化是在Firefox中實現的,但無法在Chrome可見。當我用Firebug檢查元素時,可以看到代碼可見。當我檢查Chrome中的元素時,它根本沒有(據我所知)出現。

我應該沒有應用任何跨瀏覽器的CSS嗎?我犯了什麼重大罪?

該網站的網址是:Homepage

感謝。

+0

*「我犯了什麼主要罪?」*您需要包括只需要最少量的代碼複製問題在帖子本身給我們一個[ MCVE。 –

+1

看起來像它在我身邊http://i.imgur.com/uNfNnb0.png –

+1

我想你沖洗了你的瀏覽器緩存?如果沒有嘗試ctrl-f5進行硬刷新,開發工具設置禁用緩存,隱私模式ctrl + shift + n。 – keyBeatz

回答

0

您正在使用太多的「!重要」語句。你的CSS顯示:

.input-group { 
    margin-top: 10px !important; 
    width: 380px !important; 
    background-color: #f4f4f4 !important; 
    height: 30px !important; 
    margin-left: 450px !important; 
} 

然後:

.input-group .form-control { 
    height:36px !important; 
} 

所以你申請兩次重要的,它是造成問題的原因。請刪除聲明,它應該工作:

.input-group { 
    margin-top: 10px !important; 
    width: 380px !important; 
    background-color: #f4f4f4 !important; 
    height: 30px; 
    margin-left: 450px !important; 
} 

.input-group .form-control { 
    height:36px; 
} 
相關問題