Jump to content

Recommended Posts

Posted

I have tried over and over to get this to work. I know I am in over my head with this but please help. I am trying to embed my fonts and make my background images not repeat. I can do this internally and I made it work once externally but I don't know what I did right. Looking over the code doesn't seem to help much.

 

I have index.css in the Fonts folder, the stylesheet in the directory, everything all referenced all nice, but every change I try to make is a new surprise. I have attached the stylesheet, the fonts index, and two of the test pages I was working with. The fonts appear to be embedded on one and no page at all shows up on the other. These are online as well.files.zip

Posted (edited)

http://eclecticdjs.com/mike/temp/12/07/embed_font.html

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

 

<html>

<head>

<style type="text/css">

@font-face {

font-family: 'RieslingRegular';

src: url('mercurius.ttf');

format('truetype');

}

body { background-color: #fad888;

color: black;

font-family: 'RieslingRegular', Arial, sans-serif;

}

h1, h2, h2 { color: red;

text-align: center;

font-family: 'RieslingRegular', Arial, sans-serif;

}

</style>

<title>PAGE NAME</title></head>

<body bgcolor="#fad888" text="black">

<h1>Font Test</h1>

This is a test of an embedded font

</body>

</html>

Edited by Hairy DJ
Posted

Thanks u guys for replying. I use a WYSIWYG web page editor. How do I apply the html 4 to it? Can I do that? What am I down loading here and how do I use it? Can you put the link back?

 

Also, for the other reply, I can do this with one font like you have shown but I want to do it to cover all my fonts at once. The way I saw it explained, you index the fonts in a css file and put it in the fonts directory, then you do an external page and put in @import with reference to the fonts like I did in the code. I think I got something wrong in the assembly of the code. This is tricky but will be quite handy if I can learn it.

 

Posted

WYSIWYG's are not good for CSS. The may insert <br />'s evry time you hit the return key.

 

Try posting a link to your test page instead of a zip file and you may get more responses.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...