Okay
  Public Ticket #1669800
style.css not working
Closed

Comments

  • whitecrane24 started the conversation

    Hello,

    I tried to use your example here from documentation: div.wpb_content_element .ui-tabs .ui-tabs-nav li, div.wpb_content_element .ui-accordion .ui-accordion-header, div.wpb_tabs .ui-tabs .ui-tabs-panel { background-color: #ff0000; }

    If I put it in the style.css from powermag-theme-folder it's not working. If I create a new style.css and put it in the powermag/css folder itÄs also not working. Other themes are working fine with this. If I put it over customizer in the additional css field (it's working with other code like setting background for body but not with the code from documentation) it's also not working. If I create a child theme and import my style I have big font and also nothing happent. Why?

     

    Btw if I create a child theme I have big font etc.:

    functions.php (from child)

    <?php
    /**
     * Powermag Child functions and definitions
     *
     * @package Powermag
     *
     */
    /**
     *  Enqueue scripts and styles.
     */
    function theme_coder_child_scripts() {
    // Enqueue Parent Stylesheet
    wp_enqueue_style( 'powermag-parent-stylesheet', get_template_directory_uri() . '/style.css' );
    } // powermag_child_scripts
    add_action( 'wp_enqueue_scripts', 'powermag_child_scripts' );
    /* You can add your own php functions and code snippets below */

    And if I am using for example 

    .site-header
    {

    background-image: url("mysite url") ! important;

    }

    it's not working.


  •  93
    djwd replied

    HI there,
    every theme work in its own ways. Please try to paste it in the Theme Options > Advanced > Custom CSS text area. If it doesn't work It's likely that Visual Composer classes names have changed over the years so that code isn't valid anymore.

    Regards
    djwd

  • whitecrane24 replied

    If it doesn't work It's likely that Visual Composer classes names have changed over the years so that code isn't valid anymore."

    --> You said it is not necessary to use visual composer and I didn't install it. 


    Here is my solution for the future:

    style.css:

    /* 
    Theme Name: powermag child theme
    Theme URI: http://www.
    Description: Theme 
    Author: WebsiteBundles
    Author URI: http://
    Template: powermag
    Version: 1.0.0
    Text Domain: powermag-child
    -------------------------------------------------------------- */ 

    /* =Theme customization starts here
    ------------------------------------------------------- */

    #################################################################

    functions.php

    <?php 
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() 
    {
    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') );
    }
    ?>

    Important: very important because otherwise you can get a white screen if you updatet a post or something like that. Therefore it's recommended to remove all white spaces and lines in the functions.php !!!!!!!!!!!!!!!!

  •  93
    djwd replied

    Hi there,

    It's not necessary but your question was about a CSS code that is meant to customize a Visual Composer element (the classes prefix wpb_ refers to WPBakery), so for that is necessary of course.

    Regards
    djwd