Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Bootstrap min.css overwrites the font css

Home Forums Support Bootstrap min.css overwrites the font css

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #139634
    Adrian Cojocariu

    Hey man, long time no see, soz bout that.

    I started working on a website again, and I’ve set up some fonts in the GP menu, but I need to use bootstrap too for a script let’s say, I placed the link rel stylesheet in the top of the gp hooks, wp head, and it looks like this

    <link rel="stylesheet" type="text/css" href="">

    When I use it, the fonts don’t work.

    Any suggestions ?

    Adrian Cojocariu

    I think I’m just gonna use collapse o matic though

    Lead Developer
    Lead Developer

    Which fonts don’t work? The ones set in Typography?

    This is probably because the bootstrap CSS applies fonts to elements, and if the CSS is called after the custom CSS written by the theme, it will overwrite those values with the bootstrap CSS.

    One way to avoid this is to call the bootstrap CSS before all the other CSS like this:

    add_action( 'wp_enqueue_scripts', 'bootstrap_scripts', 0 );
    function bootstrap_scripts() {
        wp_enqueue_style( 'bootstrap', '' );
    Adrian Cojocariu

    Thx man, I will try it.

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