Upfront Overrides Custom CSS

Howdy!

This is just a simple question. Why would Upfront override my custom CSS for some HTML I put in? (My code is the CSS and HTML placed into a Code Block Element. Completely custom section)

I have paragraph styles and character styles and my fonts were overridden by the Theme Settings/Type Settings. Specifically, the <a href> was being forced to the font: Lato, because that is what was selected in the Type Settings. But I had paragraph styles and character styles in place to change the font which were not being accepted. I even put into the style sheet:

a {
    font-family: Arial, sans-serif;
}

And that did not work. So I changed the type settings and it did make the change I wanted, but only because I wanted Arial. My concern is that while working right now, that any other future elements that are custom, I will not be able to use the font that I want due to Upfront overriding my custom CSS.

I am just looking for general thoughts on how I can force my fonts through and have them be top priority instead of what Upfront is pushing through the type settings.

Thanks so much!

Peace,
-Albert

  • Ken Kimbrell

    Hello Albert-

    Try giving your CSS style an important declaration! If that does not work, try moving your CSS style to a different area, like the ones recommended below:

    You will need to apply the custom CSS to your child-theme's style.css, or you can use the built-in wordpress Additional CSS option in the customizer, by going to your wordrpess dashboard and find Appearance > Customize > Additional CSS when on the front-end customizer.

    You can also use this free plugin called Simple CSS:
    https://wordpress.org/plugins/simple-custom-css/

    The ultimate goal would be to apply the CSS in an area that if you were to update your theme it would not get overwritten. See the code below:

    a {
        font-family: Arial, sans-serif !important;
    }

    Let me know if this helps!

    Take Care,

    Ken - WPMU DEV Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.