2017-01-29 109 views
2

我有一個兒童主題,用於我正在使用的二十二個。它已被檢查爲CSS級別3有效,沒有錯誤。兒童主題CSS沒有被應用

/* Minimum width of 600 pixels. */ 
@media screen and (min-width: 600px) { 
.site { 
    margin: 0 auto; 
    max-width: 960px; 
    max-width: 68.571428571rem; 
    overflow: hidden; 
} 

在我積極利用孩子的主題,即使原來是進口的,我把下面的

/* Minimum width of 600 pixels. */ 
@media screen and (min-width: 600px) { 
/*BEGIN MY RESET*/ 

/*Site background overall*/ 
.site { 
max-width: 100% !important; 
background-color: #fff; 
} 

但只有前者似乎生效,而後者似乎並不從我使用的兒童主題進行申請。

任何人都請指教?

我的孩子主題CSS:查看源代碼:http://stanleyss.com/wp-content/themes/twentytwelvechild/style.css

我父主題CSS:http://stanleyss.com/wp-content/themes/twentytwelve/style.css

回答

0

我想你惹孩子樣式表包容,檢查什麼功能,你使用的包括兒童樣式表中你要跟functions.php文件。 如果使用

wp_enqueue_style('your-style-handler', get_template_directory_uri() . '/style.css'); 

然後更改此代碼

wp_enqueue_style('your-style-handler', get_stylesheet_directory_uri() . '/style.css'); 

get_template_directory_uri()使用父主題文件包含和get_stylesheet_directory_uri()用於兒童主題文件包含。

+0

感謝@ nahid哈桑twentytwelve進行了更新和不變,在functions.php的 我 '//加載我們的主要樣式。 wp_enqueue_style('十二二式',get_stylesheet_uri());' 任何其他的想法? – l33tcodes