treehouse : what would you like to learn today?
Web Design Web Development iOS Development

set specific TTF in CSS

  • hi all,
    i just registered css-tricks forum this morning :D
    i want to ask about how to set specific TTF in CSS
    i have searched in google and find the answers
    but when i do it, nothing happen, so i want to discuss it with css master here, pls help me ;)

    here the html code - INDEX.HTML

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\">
    <head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
    <title>Untitled</title>
    <link rel=\"stylesheet\" type=\"text/css\" href=\"css/font.css\" />
    </head>
    <body>
    <h1>Donec ullamcorper fringilla eros.</h1>
    <p>Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes,
    nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros.
    Etiam at ligula et tellus ullamcorper ultrices. </p>
    </body>
    </html>


    and here the css code - FONT.CSS

    @font-face {
    font-family: \"Pepsi\";
    src: url(pepsii.ttf) format(\"truetype\");
    }

    h1 { font-family: \"Pepsi\"; }


    i put all files in 1 folder (index.html, font.css, pepsii.ttf)
    i am looking forward for your help, guys...

    regards,
    odil