Child CSS not working for some of the classes - twenty seventeen theme

Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing..navigation-top

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 your functions.php. – norman.lol Commented Mar 26, 2019 at 20:39
Add a comment  | 

1 Answer 1

Reset to default 0

You 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

相关推荐

  • Child CSS not working for some of the classes - twenty seventeen theme

    Parent and child CSS both classes loading as per CSS rules, but parent is functioning and child failing..navigation-top

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信