Topic: font-family not working... so, huh? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10898" title="Pages that link to Topic: font-family not working... so, huh? (Page 1 of 1)" rel="nofollow" >Topic: font-family not working... so, huh? <span class="small">(Page 1 of 1)</span>\

 
Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 01-29-2003 23:25

My homepage has font-family defined in its body class. The exact definition is

code:
body {
/* some other non-font declarations */
font-family: georgia, times, "times new roman", serif;
font-size: 14px;
}



Even though I've got "serif" as my final fallback, I was getting a sans-serif font when I tested in Mac IE 5.5 and Linux Konqueror (but not in Safari, which is Konqueror-based).

I checked my Linux system, and sure enough, I've got Times set as my default serif font. So a font-family: serif should definitely come up Times. The Mac system turned out to have both Times and Times New Roman installed. Again, serif should work.

Okay, I thought, maybe those browsers don't like it when I put a font-family in the body tag. Lemme try this...

code:
p {
font-family: georgia, times, "times new roman", serif;
}



Even with the font-family applied to a P tag, I didn't get a serif font in Mac IE 5.5 and Linux Konqueror! This is a bit too weird for me. I'm wondering if anyone knows something I don't.

Sanzen
Paranoid (IV) Inmate

From: Raleigh, NC
Insane since: Jan 2003

posted posted 02-01-2003 20:19

are you using tables? if so, put the font-family property in your CSS for the TD's

"Salting the back of a snail... My turkish prison is knowing that i fit in...."- Glassjaw

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 02-01-2003 21:02

I have to say that I am at a loss here....

Whether or not tables are in use should ahve no bearing in this whatsoever, especially if the text is in a paragraph, and the font properly set for the <p> tag.

The only thing I can possibly think of, is perhaps there is some setting on the Mac ie that has been set to overide this?



CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 02-03-2003 22:42

not sure, but could it have something to do with the quotes around the times new roman.
I am not sure if mac just don't like this or what. maybe??

Later,

C:\


~Binary is best~

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 02-03-2003 22:47

ah, I think I found something here. Not sure.

In you HTML you have the main contents under a div called "main", in your CSS you don't have anything referencing the font-family for that div.

You just have:

code:
div.main {
padding-top: 150px;
margin-left: 72px;
width: 60%;
}

body>div.main {
padding-top: 130px;
}



In the div.main (or you could just do .main) put in the font-family:. . . . stuff too.

As I understand it, the CSS for the div is not going to hold for the body tag and vice versa. Maybe wrong, but check and see.

Later,

C:\


~Binary is best~

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 02-03-2003 23:22

I just tried it without the "times new roman" in there at all; and with a div {font family: blah blah blah} statement. No dice either way.

I'm thinking it could just be one of those great mysteries of life.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-03-2003 23:26

If it's only a couple browsers with the problem, it may very well be a bug. Try searching google?

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 02-04-2003 00:07

I'm baffled as well, but DL was right when he said it shouldn't matter whether the text is in a table or div or whatever. If you style the paragraph element, those styles will carry over no matter where the <p> is located (unless you specify otherwise).

Also, CSS specified for the body will be inherited by elements within the body (ie, the rest of the document), unless you specify otherwise. So both of those pieces of CSS above should have worked.

And if Slime doesn't know, then it must be a bug.

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 02-04-2003 02:23

Well well well! Thanks for suggesting the bug idea. Since everything on my page is enclosed in one div or another, I guess I'll just define font-family a second time for the div element.

No clue what's up with Konqueror, though, but obviously that's a teeny tiny slice of the internet... and letting someone using their default font to view my page isn't exactly a usability breakdown, and only a small design breakdown.

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 02-04-2003 06:22

Well, I'm glad you got that figured out. And I agree: I wouldn't worry too much about bugs in Konqueror. If you start working around all the little quirks (bugs) in all of the browsers, you're going to end up with bloated code.

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 02-04-2003 09:41

Aye-aye, cap'n... also, in Spanish, "ay ay." All y'all Spaniards know what I'm talkin' 'bout.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu