Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15630

    Hello,

    I was changing some css using the custom.css file but i decided to move to a child theme. It took me some time to realize that if I do not use the !important declaration in th style.css “child” file, most of the changes are not working. Do I have to use the !important after every changed?

    #88315

    Hi Dietista,

    No you shouldn’t need to. As long as the child theme css is being included after the themes css it should take priority. It will also need to have the exact same css selecter+declaration combo so that it cleanly replaces things.

    Ex:

    .nav_menu{color:red;}

    will not replace

    #top .nav_menu{color:blue;}

    Regards,

    Devin

    #88316

    Same here. On my side it was not most of the changes, but still a view. I even had a couple of things that didn’t even work with !important. Had to place them in the custom.css file of the mother theme or the Quick CSS field in the theme options to work.

    #88317

    Thank you for your answer. I will take care of it!

    #88318

    Hey,

    Glad Devin could help. :)

    Regards,

    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Use of !important in child theme’ is closed to new replies.