Solved

How to use @font-face in IE?

Posted on 2010-09-21
5
533 Views
Last Modified: 2012-05-10
Hello, here is my code:

@font-face {
      font-family: blackjack;
      src: url('fonts/blackjack.eot');
      src: url('fonts/black_jack.ttf') format('truetype');
}

but this wont work in IE, but it will in Firefox.  This works in IE though:

@font-face {
      font-family: blackjack;
      src: url('fonts/blackjack.eot');
}

but then, obviously, it will not show in Firefox, or other browsers.  Can someone please let me know how to fix this?
0
Comment
Question by:FairyBusiness
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
Funcod earned 500 total points
ID: 33727753
try this:

@font-face {
  font-family: 'blackjack';
  src: url('fonts/blackjack.eot');
  src: local('¿'),
         url('fonts/black_jack.ttf') format('truetype');
}
0
 

Author Comment

by:FairyBusiness
ID: 33727765
why put the local?? and what is this ('?')

I dont know how to make an up-side-down question mark. . . just curious!
0
 
LVL 1

Expert Comment

by:Funcod
ID: 33727798
replace the ¿ by the smiley (alt+1 if you are on windows)

check this url for info:
http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
0
 
LVL 3

Expert Comment

by:daddotnet
ID: 33727812
@font-face{ /* for IE */
font-family:MyFont;
src:url(myfont.eot);
}
@font-face { /* for non-IE */
font-family:MyFont;
src:url(http://:/) format("No-IE-404"),url(myfont.ttf) format("truetype");
}

-DdN
0
 

Author Comment

by:FairyBusiness
ID: 33728083
thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Kill default webkit margin!  Please! 6 23
Syntax Error 2 48
Custom Form Design to Match this example 1 18
is this a cms? 8 36
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now