Mantz Posted November 1, 2006 Share Posted November 1, 2006 Hey thereI got a strange question. I tried to use an external Font on my Webpage and it works perfect for p, but when I try to use it for any header (eg. h1) it just won't work. Can anyone tell me why, and what I could do about it?Here is an example from the w3schools page which I changed a bit so one can see my problem<html><head><style type="text/css">h3 {font-family: "Edwardian Script ITC"} //Here is the problem, it just shows the default fontp {font-family: "Edwardian Script ITC"}p.sansserif {font-family: sans-serif}</style></head><body><h3>This is header 3</h3><p>This is a paragraph</p><p class="sansserif">This is a paragraph</p></body></html>Thanx already Link to comment Share on other sites More sharing options...
Err Posted November 2, 2006 Share Posted November 2, 2006 Have you tried attaching a class or id to your <h3> tag and css? like:css: h3.header {font-family: "Edwardian Script ITC"} html: <h3 class="header">This is header 3</h3> Try that and see if that helps. Link to comment Share on other sites More sharing options...
real_illusions Posted November 2, 2006 Share Posted November 2, 2006 you've missed out a ';' on the end of your css lines. I've also been told/read that, fonts shouldn't have the " around them. It should read like this: <style type="text/css">h3 {font-family: Edwardian Script ITC;} //Here is the problem, it just shows the default fontp {font-family: Edwardian Script ITC;}p.sansserif {font-family: sans-serif;}</style> Link to comment Share on other sites More sharing options...
Mantz Posted November 2, 2006 Author Share Posted November 2, 2006 I did try it with a class, but it still doesn't work. I just keep on trying difernt ways. Otherwise I'll just do it the hard way, and change it in each page... Have you tried attaching a class or id to your <h3> tag and css? like:css:h3.header {font-family: "Edwardian Script ITC"} html: <h3 class="header">This is header 3</h3> Try that and see if that helps. This doesn't change anything. It most be something else. But thanks for trying.you've missed out a ';' on the end of your css lines. I've also been told/read that, fonts shouldn't have the " around them. It should read like this:<style type="text/css">h3 {font-family: Edwardian Script ITC;} //Here is the problem, it just shows the default fontp {font-family: Edwardian Script ITC;}p.sansserif {font-family: sans-serif;}</style> Link to comment Share on other sites More sharing options...
Mantz Posted November 2, 2006 Author Share Posted November 2, 2006 Thanx for all your help. I just figured it out. It was a Browser Problem. Safari is just too picky. Since it isn't allowed to use any other font than the standarts, the Safari just won't show it right. So I just mad a p.header class and it works fine now.CheersMantz Link to comment Share on other sites More sharing options...
real_illusions Posted November 2, 2006 Share Posted November 2, 2006 i never said what i changed it to would solve it, i just changed it so it was correctly written :) Link to comment Share on other sites More sharing options...
croatiankid Posted November 3, 2006 Share Posted November 3, 2006 I've also been told/read that, fonts shouldn't have the " around them.W3C recommends (try validating) putting quotes if they contain whitespace, for example Times New Roman should be "Times New Roman". This is because if a font were to contain more than 1 consecutive white space, for example imaginary font , without the quotes it would be rendered as imaginary font . I don't know if there is a font like this, but it's W3C recommended. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now