1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Child style.css does'nt work

Discussion in 'Free Divi Community Forum' started by Luc Fayard, Feb 15, 2020.

  1. Luc Fayard

    Luc Fayard New Member

    Hello Everybody !
    Sorry for my question ! I'm a beginner in Wordpress and Divi. I have created a child theme but if I added a code, It did'nt work. But If I put the same code in Divi Custom CSS, it works!
    Can you give me some leads to fix it ? Thank You very much.
    My site: https://10jourspourvoirautrement.org
    My child functions.php
    PHP:
    <?php
    function theme_enqueue_styles() {
    wp_enqueue_style('divi'get_template_directory_uri() .'/style.css');
    }
    add_action'wp_enqueue_scripts''theme_enqueue_styles' );
    My child style.css with code for text in 2 and 4 columns that works in Custom CSS but not here
    [CSS]
    /*
    Theme Name: My Divi Child
    Theme URI: https://demo.infomaniak.com/preview?t=divi-creative-agency
    Description: Divi Theme Child
    Author: Luc Fayard
    Author URI: https://www.infotekart.com
    Template: Divi
    Version: 1.0.0
    */
    /* ligne d'origine dans Divi Creative Agency
    @import url("../Divi/style.css"); */
    /*Texte en 2 col*/
    @media screen and (min-width: 981px){
    .deuxcol
    {
    -webkit-column-count:2;
    /* Opera, Safari, Google Chrome */
    -moz-column-count: 2;
    /* Firefox */
    column-count: 2;
    /* Internet Explorer */
    }
    }
    #et-top-navigation .et_pb_button:after {
    font-size: 23px;
    }
    /*fin Texte 2 col*/
    /*Texte en 4 col */
    @media screen and (min-width: 981px){
    .quatrecol
    {
    -webkit-column-count:4;
    /* Opera, Safari, Google Chrome */
    -moz-column-count: 4;
    /* Firefox */
    column-count: 4;
    /* Internet Explorer */
    }
    }
    #et-top-navigation .et_pb_button:after {
    font-size: 23px;
    }
    /*fin Texte 4 col*/[/CSS]
     
    1. PRO MEMBER PERKS Divi Ultimate Child Theme - Tons of premade layouts & section designs + functionalities for your Divi site:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Seems like your child theme style.css loaded fine. Perhaps it's just a CSS priority issue.

    For your CSS, try to add !important tag & see if it works.