admin管理员组文章数量:1026989
Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing.
.navigation-top {
background: #fff;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
font-size: 16px;
font-size: 1rem;
position: relative;
}
.navigation-top {
background-color: #eeeeee;
border-bottom: 2px solid #e60909;
}
My functions.php
is shown below:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing.
.navigation-top {
background: #fff;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
font-size: 16px;
font-size: 1rem;
position: relative;
}
.navigation-top {
background-color: #eeeeee;
border-bottom: 2px solid #e60909;
}
My functions.php
is shown below:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
Share
Improve this question
edited Mar 26, 2019 at 20:54
norman.lol
3,2413 gold badges30 silver badges35 bronze badges
asked Mar 26, 2019 at 20:25
Nityanand ShetNityanand Shet
31 bronze badge
1
|
1 Answer
Reset to default 0You should type with
!important;
Tag with css like these it will work
.navigation-top { background-color: #eeeeee !important; border-bottom: 2px solid #e60909 !important; }
Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing.
.navigation-top {
background: #fff;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
font-size: 16px;
font-size: 1rem;
position: relative;
}
.navigation-top {
background-color: #eeeeee;
border-bottom: 2px solid #e60909;
}
My functions.php
is shown below:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing.
.navigation-top {
background: #fff;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
font-size: 16px;
font-size: 1rem;
position: relative;
}
.navigation-top {
background-color: #eeeeee;
border-bottom: 2px solid #e60909;
}
My functions.php
is shown below:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
Share
Improve this question
edited Mar 26, 2019 at 20:54
norman.lol
3,2413 gold badges30 silver badges35 bronze badges
asked Mar 26, 2019 at 20:25
Nityanand ShetNityanand Shet
31 bronze badge
1
-
Remove that closing
?>
PHP tag from yourfunctions.php
. – norman.lol Commented Mar 26, 2019 at 20:39
1 Answer
Reset to default 0You should type with
!important;
Tag with css like these it will work
.navigation-top { background-color: #eeeeee !important; border-bottom: 2px solid #e60909 !important; }
本文标签: Child CSS not working for some of the classestwenty seventeen theme
版权声明:本文标题:Child CSS not working for some of the classes - twenty seventeen theme 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745655931a2161595.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
?>
PHP tag from yourfunctions.php
. – norman.lol Commented Mar 26, 2019 at 20:39