WordPress.org

Support

Support » Themes and Templates » Tiny Forge » [Resolved] Child Theme CSS being Overridden by Parent?

[Resolved] Child Theme CSS being Overridden by Parent?

  • I am attempting to change fonts, but my css is being overridden by the parent style.css when using Firefox (Mac & PC) or IE.

    Here is a testing URL: http://greatlakesbatteriesllc.com/sitecore/

    Here is a bit of code from my child theme’s css:

    @import url(http://fonts.googleapis.com/css?family=Cabin+Condensed:400,600,700,500|Montserrat+Alternates:400,700);
    
    body{
    	background:url(images/pageBG.jpg) repeat-x;
    	color:#fff;
    	font-family: "Cabin Condensed" sans-serif;
    }
    
    body.custom-font-enabled {
        font-family: "Cabin Condensed" sans-serif;
    }

    When I look at the child theme css in firebug, the font-family isn’t even there. It is in the file if I load it individually (http://greatlakesbatteriesllc.com/sitecore/wp-content/themes/greatLakes/style.css)

    The site seems to work correctly in Chrome and Safari.

    There are also other bits of css that are not being applied or recognized. I’m stumped.

    Any thoughts or suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • CrouchingBruin

    @crouchingbruin

    Firefox is quite picky when it comes to correct CSS syntax. You are missing a comma between your different font styles in the font-family property.

    Change this:

    font-family: "Cabin Condensed" sans-serif;

    to this:

    font-family: "Cabin Condensed",sans-serif;

    That was the problem. I’ve been doing this long enough that I should have been able to find that.

    Thanks for the second set of eyes!

    Theme Author Tomas Mackevicius

    @tomasm

    I see you’re using style.css to insert google styles, but I suggest you using the code in functions.php (search Tip31), because google recommends adding its styles in the first place before any other styles.

    Also @import increases load time of the site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Child Theme CSS being Overridden by Parent?’ is closed to new replies.
Skip to toolbar