Viewing 3 replies - 1 through 3 (of 3 total)
  • There is another style injected in the <head> after child theme stylesheet. It also contains style property for .top-icons, and this is why the CSS code in child theme stylesheet with exact same selector doesn’t work.

    The workaround is to use a selector with more css specificity, like this for examle

    body .top-icons {
    	background: #fff;
    	border-bottom: 1px solid #eee;
    	margin-bottom: 25px;
    }

    But it’s better to fix the problem at the root cause by figuring out where that (injected) style comes from and then remove that part. From viewing source, it just uses <style type="text/css">, so you have to look around in theme option settings, it should be there because that style also contains lot of common thing in theme. If it is not in theme option, it could be in a custom plugin.

    Also on a sidenote, there are double child theme stylesheets enqueued in the <head>, so please take a look at child theme’s function.php and fix it there.

    Thread Starter stylisticallyb

    (@stylisticallyb)

    THANK YOU Paulwpxp! I have been having quite a few problem since installing this theme. I figured something was wrong with it when it didn’t work. I will try to get someone to help me fix the error that you pointed out above. Thanks again.

    Thread Starter stylisticallyb

    (@stylisticallyb)

    I used a plugin to create my child page, and maybe that caused the issue. I ended up deleting the code that was in function.php and adding the suggested code from here https://codex.www.ads-software.com/Child_Themes. Then I added the code that paulwpxp suggested to my style sheet and everything is working great. I am not sure if this corrected the issue that was mentioned of if this was just the way around it, but either way the header is now white, so I am pleased ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to edit theme style using child theme’ is closed to new replies.