Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1186315
    ATCompressors
    Participant

    Hello there,

    When inputting my custom CSS in style.css of the child theme, not all of the changes I would like to make are updated on my website.
    However, when inputting the same CSS in the Customizer, all changes automatically occur.

    I have tried adding !important; to the CSS that doesn’t seem to be working and it doesn’t make the slightest difference.

    I’ve tried emptying the cache of my website and emptying the cache of my browser and nothing seems to make the slightest difference.

    I’m at a complete loss as to what I am doing wrong.

    #1186429
    Rahul
    Moderator

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1186503
    ATCompressors
    Participant

    This is the URL: http://aandtcompressors.com/home

    I was first having trouble in getting the top border of the footer to change colour. I was using the following CSS:

    .x-colophon.bottom {
    border-top: 2px solid #d74242; !important;
    background-color: #000000;
    } 

    I’ve managed to work around it by instead changing the colour to the top border of the content band above the footer.
    I used this code:

    .border-top.x-content-band {
    border-top: 5px solid rgb(215, 66, 66);
    }

    I would be very grateful to know how I could make that code content band specific.
    I don’t want the top borders of all the content bands to be red.

    The second issue I’m having trouble with is in regards to a custom headline.
    I used the following code:

    .my-custom-headline {
        color: #000000; !important;
    }

    It works in the customiser but not in style.css

    #1186630
    Jade
    Moderator

    Hi there,

    Please add this code in the functions.php of the child theme then test the CSS in the style.css again:

    function remove_theme_version_strings( $src ) {
         
        $theme_version = wp_get_theme(get_template())->get( 'Version' ); // theme version
        parse_str( parse_url($src, PHP_URL_QUERY), $query );
        if ( !empty( $query['ver'] ) && $query['ver'] === $theme_version ) { // Active theme version
            $src = remove_query_arg( 'ver', $src );
        }
        return $src;
         
    }
    
    add_filter( 'style_loader_src', 'remove_theme_version_strings' );

    Hope this helps.

    #1187725
    ATCompressors
    Participant

    Unfortunately, that doesn’t seem to have changed anything.

    Do you think it has anything to do with how I’ve written the CSS?

    #1187733
    Darshana
    Moderator

    Hi there,

    You can try adding the !important flag and see if that makes any difference. Also copy all of your CSS rules into an online tool like CSS Lint (http://csslint.net/) and check for CSS errors. If you have errors, CSS won’t parse correctly until you fix it.

    Let us know how it goes.
    Thanks!

    #1190496
    ATCompressors
    Participant

    CSS Lint worked a charm!
    I’ve never heard of it before, but I can already tell that I’m going to be visiting it very frequently in future. 🙂
    It’s so grand that it tells you exactly what you’re doing wrong.

    Thank you kindly for your help. 😀

    #1190499
    Christopher
    Moderator

    You’re most welcome.

  • <script> jQuery(function($){ $("#no-reply-1186315 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>