dpo60833 2017-07-20 18:30
浏览 74

Divi子主题拒绝覆盖父CSS - body

if this question is duplicate of some other, i do apologize. But i am not able to find the right answer. I am building some web page. I use Divi theme via WordPress. I've created child theme of Divi theme. I've attached custom style.css via function.php in child theme:

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', 
get_template_directory_uri().'/style.css' );
}

But when I want to change some main elements, like body{}, it does not override parent style. Mine actual customization process is:

  1. Find which id/class have the element, which i wanna change.
  2. Via additional CSS in the theme customize the element with class/id I've found.
  3. Hope that it will have the exact behavior I want.

I can't find any good source to learn how this all parent->child customization works and I struggle with basic things. Can you help me, how to easily change many elements of parent's theme? Any help would be nice. Thank you guys!

Edit: There is code from site: site_inspect

And there is code in my css:

body.custom-background {
background-image: url("images/pozadie_B5.png");
background-color: black;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center -25%;
}

When i place this in Additional CSS in THEME customizer, then it works. But in style.css in my child theme it does not.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料