Forums

@FontFace not working in my WP site (3 posts)

  1. bigmaz
    Member
    Posted 5 months ago #

    Hi guys

    I cannot seem to get my FontFace font working in my site. Here is the relevant part of my CSS, it just keeps defaulting to the font after my fontface font (Arial):

    body { background:#181818; margin-top:10px; margin-bottom:10px; font-family: CabinRegular, Arial, sans-serif; }
    	* { margin: 0; padding: 0; outline: 0; }
    	a { color: #39a7dc; text-decoration: none; }
    	a:hover { cursor: pointer; text-decoration: none;  color:#A1D800; }
    	a img { border: 0; }
    	ol,ul { list-style:none; }
    	h1 { color: #39a7dc; }
    	h3 { color: #39a7dc; }
    	#flashvideo { z-index:-1 !important;}
    
    	@font-face {
        font-family: 'CabinRegular';
        src: url('fonts/Cabin-Regular-webfont.eot');
        src: url('fonts/Cabin-Regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('fonts/Cabin-Regular-webfont.woff') format('woff'),
             url('fonts/Cabin-Regular-webfont.ttf') format('truetype'),
             url('fonts/Cabin-Regular-webfont.svg#CabinRegular') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }

    I have stored my fonts folder withing my theme directory e.g. /my theme/fonts. Any ideas?

    cheers
    Martin

  2. shaneholden
    Member
    Posted 5 months ago #

    Do you have a link?

    I'm comparing to my @font-face, and everything matches what you have, except where you're calling the font-family, I have mine with single quotes around it, like font-family: 'CabinRegular', Arial, sans-serif;

  3. bigmaz
    Member
    Posted 5 months ago #

    hi shane, thanks for your reply, sorry I cannot send a link on here. I tried putting the single quotes on, but didnt work. Thanks though

Reply

You must log in to post.

About this Topic

Tags

No tags yet.