Solved

How to use @font-face in IE?

Posted on 2010-09-21
5
535 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wrapper for APPs 9 85
ebay style="image-orientation: 90deg;" 2 53
Using Specialized Fonts in CSS 1 24
Character counter breaks after adding EmojiOne Area 4 23
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

829 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