Home Forums Pro Themes Onefold Pro Overiding CSS in a child theme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #60965

    I notice that when trying to change such things as…
    /* slider headers and captions */
    #main-slider p, #main-slider h3 {
    background-color: rgba(0,0,0,.37);

    I can only seem to override styles in the “Additional CSS” section within the theme vs. WordPress’ editor which is writing to a child-theme .css file that I have enqued within funtions.php.

    Is there any reason why the “Additional CSS” area within the theme’s customization area is taking precedence over my custom CSS file which is set up in a child theme?

    This functionality would be helpful on several fronts when using my child theme.
    Any advice would be greatly appreciated.

    From my functions.php…
    function my_theme_enqueue_styles() {

    $parent_style = ‘onefold-pro’; // This is ‘onefold-pro’ parent.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style ),
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );


    Overriding CSS seems to work in my enqued .css now.
    This is only when I select “default” in the associated color palette?

    #main-slider p, #main-slider h3 {
    background-color: rgba(0,0,0,.33);
    now works in another area.

    Is this normal behavior?
    For anything that I want to overwrite, do I keep the theme defaults in place?
    Is there a conditional that delivers this behavior?

    Really sorry for all of the questions.
    Your advice and help is always appreciated.



    Hello @dickkirkland,

    The CSS that is included in the Additional CSS of the customizer will load at first and this how theme works.

    So if you have to overwrite any CSS within the theme then you can post the CSS in Additional CSS as it load at first.

    You can also use child theme for any style modification in the theme if you have to make lots of modification but if you have to modify just one, 2 section then you can use additional CSS.

    Hope this helps.

    Best Regards!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.