Hi. I'm trying out the css @font-face style and it's not working. I built a simple html document along with simple css, so I expected it to work, but it won't.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/index-css.css" rel="stylesheet" type="text/css" />
<p id="fonttest">Bebas Regular. Home. Services. About Us. Mission Statement.</p>
/* CSS Document */
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on September 22, 2012 */
src: url('bebas___-webfont.eot?#iefix') format('embedded-opentype'),
font-family: bebasregular, verdana, sans-serif;
Can someone please help?
Where have you placed your webfont files that were generated by Fontsquirrel? Is it in the root location of your HTML file (because that is what your CSS rule says).
Also, what version of DW are you using? Depending on what version you're using, there is an option within DW that can embed your created webfont family within your project.
Thanks for the responses, but I figured it out. The font files have to be in the same folder as the CSS, not the HTML.
As an FYI for the future, and for anyone else that comes across your question, the fonts DO NOT need to be in the same folder as the CSS. However, you do need to link to them correctly.
Eg, src: url('bebas___-webfont.eot'); which is in your CSS sheet is looking for that file in the same location as the CSS sheet.
If you add / before, /bebas__-webfont.eot, then it is looking for the font in the root of the site.
Personally, I keep my fonts in a "fonts" folder in the root of the site so my URL from your CSS sheet would have been:
Europe, Middle East and Africa