[Resolved] Custom CSS vs style.css in Child Theme

Home Forums Support [Resolved] Custom CSS vs style.css in Child Theme

Home Forums Support Custom CSS vs style.css in Child Theme

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #160309
    Mary Pearson

    Hi Tom,

    My new site at https://christiangayschat.com is quite slow. Several things were suggested to me to help speed things up including deleting the Simple Custom CSS plugin by just putting everything into the style.css file of child theme.

    Seemed easy enough so that’s what I’ve done. All seems to be working well except the spacing of my menus. The code works in Custom CSS but not in style.css of child theme.

    /* Nav Menu Logged Out – space items */
    .menu-item-897, .menu-item-310, .menu-item-1595, .menu-item-1037, .menu-item-437 {
    padding-left: 60px ; }
    .menu-item-307 {
    padding-left: 20px ; }

    /* Nav Menu Logged In – space items */
    .menu-item-809, .menu-item-48, .menu-item-433, .menu-item-810, .menu-item-1593, .menu-item-55 {
    padding-left: 40px ; }
    .menu-item-47 {
    padding-left: 20px ; }

    Any idea what the problem might be?
    Thanks!

    #161352
    Mary Pearson

    Any idea what I’m doing wrong by just using style.css in the child theme instead of Custom CSS plugin? It isn’t working for me.

    #161446
    Tom
    Lead Developer
    Lead Developer

    Hi Mary,

    Sorry for not getting back to you sooner – this slipped by somehow.

    First, having your CSS in the Custom CSS plugin vs a child theme will not make any difference to the speed of your website. If it does, it won’t even be noticeable by Google bots.

    You can try adding !important after your values to see if they aren’t specific enough to override the core defaults.

    .menu-item-307 {
        padding-left: 20px !important; 
    }
    #161478
    Mary Pearson

    Thank you Tom. I’ll take your word for it in spite of what I was told. It’s easier to use the Simple CSS plugin anyway, and you have proven to me over the years that you know what you’re talking about.

    Much appreciated.

    Merry Christmas!

    #161483
    Tom
    Lead Developer
    Lead Developer

    Hi Mary,

    Some argue that having the CSS in the <head> is actually faster than linking to an external stylesheet 🙂

    Merry Christmas to you as well!

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