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; }
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745655933a4638541.html
?>
PHP tag from yourfunctions.php
. – norman.lol Commented Mar 26, 2019 at 20:39