Okay
  Public Ticket #605418
Custom Font Across Website, Especially Headings
Closed

Comments

  • Rob started the conversation

    Hi,

    I have uploaded my own custom font 'Brown' and used the @font-face css code to successfully change some parts of the site to use the font. Currently, all 'p' and 'a' items on the website are successfully changed to Brown.

    I want the entire site to use Brown but cannot seem to target the other items, especially the headings (h1 through to h6). Here is the code I have so far:

    @font-face {
        font-family: "Brown-Regular";
        src:url("fonts/lineto-brown-regular.eot");
        src:url("fonts/lineto-brown-regular.eot?#iefix") format("embedded-opentype"),
            url("fonts/lineto-brown-regular.woff") format("woff");
        font-weight: normal;
        font-style: normal;
    }
    
    
    @font-face {
        font-family: "Brown-Bold";
        src:url("fonts/lineto-brown-bold.eot");
        src:url("fonts/lineto-brown-bold.eot?#iefix") format("embedded-opentype"),
            url("fonts/lineto-brown-bold.woff") format("woff");
        font-weight: normal;
        font-style: normal;
    }
    
    
    h1, h2, h3, h4, h5, h6 { 
        font-family: "Brown-Bold", 'Raleway', sans-serif;
    }
    
    
    body h1.light, body h2.light, body h3.light, body h4.light, body h5.light, body h6.light, p.light {
        -webkit-font-smoothing: antialiased;
        font-family: "Brown-Regular";
        color: #fff;
        font-weight: 300;
    }
    
    
    body h1.dark, body h2.dark, body h3.dark, body h4.dark, body h5.dark, body h6.dark, p.dark {
        -webkit-font-smoothing: antialiased;
        font-family: "Brown-Regular";
        color: #000;
        font-weight: 300;
    }
    
    
    p, a {
        font-family: "Brown-Regular", 'Raleway', sans-serif;
    }

    Please assist!

    Cheers,
    R

  •  8,470
    Tahir replied

    Hey ,

    Try using the !important Selector. Also i am gonna need the Page url to see the css in the live browser.

    Best.


    ThemeNectar Support Team