Search code examples
htmlcssfont-face

using @font-face


Im trying to use a custom font using @font-face and for some reason its working on some places and not in others.

CSS This works fine

#hero-header .title {
    color: #fff;
    padding-top: 225px;
    font-size: 30px;
    font-family: 'Populaire';
    text-align: center;
    font-size: 64px;
    }

This doesn't

ul#reviews h2 {
    font-size: 30px;
    font-family: 'Populaire';
    }

Notice the Hero area using a custom font but unable to use it further down the page, ie: the review titles.


Solution

  • Your CSS is:

    @font-face {
        font-family: 'Populaire';
        src: url('font/Populaire.otf');
    }
    

    But, the font is actually in /beta/styles/css/fonts/Populaire.otf, please update your CSS to:

    @font-face {
        font-family: 'Populaire';
        src: url('/beta/styles/css/fonts/Populaire.otf');
    }