homepage Welcome to WebmasterWorld Guest from 54.198.224.121
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
Opera Font Sizes in CSS
jimmykav




msg:1201544
 11:26 am on Aug 1, 2002 (gmt 0)

I have just downloaded Opera to see what its users get when they visit my site. To my horror all of the fonts on my pages are absolutely huge compared to what is seen with IE.

the style is set in a CSS with the following

.Std { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:"xx-small" ;}

while I acknowledge that "xx-small" is open to interpretation the font that is shown in Opera must be 14 - 16pt.

suggestions welcomed....

 

Eric_Jarvis




msg:1201545
 11:31 am on Aug 1, 2002 (gmt 0)

don't set a standard font size...allow users to see the bulk of text at their default size and you have no worries about the differences between platforms at all

Nick_W




msg:1201546
 11:38 am on Aug 1, 2002 (gmt 0)

I don't think this is a xx-small issue, try this and tell me what you see:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Font test</title>
<style type="text/css">
h1 {
font: 2em arial, verdana;
}
.keywords {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
}
</style>
</head>
<body>
<h1>Opera Font test</h1>

<p class="keywords">This is text sized with keywords</p>
</body>
</html>

It works just fine for me....

Nick

jimmykav




msg:1201547
 11:39 am on Aug 1, 2002 (gmt 0)

Hi Eric

thanks for your suggestion but that does not really answer the question....

jimmykav




msg:1201548
 11:46 am on Aug 1, 2002 (gmt 0)

Nick, that looks good to me.
I should point out that the css is an external file that i include with

<link rel="stylesheet" type="text/css" href="styles.css">

could that be an issue. does the DOCTYPE stuff have an impact ?

Nick_W




msg:1201549
 11:47 am on Aug 1, 2002 (gmt 0)

Shouldn't make any difference at all. Let's see the surrounding html....

Nick

jimmykav




msg:1201550
 12:02 pm on Aug 1, 2002 (gmt 0)

Nick

I inserted the following into the <head></head> section of the html you sent:

<link rel="stylesheet" type="text/css" href="styles.css">

that file has the following:
P { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: "xx-small"; }

I then added some text at the end of your html:
<P>normal text</p>

so that now we have inline and external styles on the page.

All of thext shows correctly in IE but the text formated with the external style is incorrect in Opera.

Nick_W




msg:1201551
 12:18 pm on Aug 1, 2002 (gmt 0)

How is it incorrect, too large or too small? You may have an issue with applying a catchall rule to p tags and a class with keywords. I get exactly the smae normal behaviour if I move the styles out to a sheet.

Nick

jimmykav




msg:1201552
 12:25 pm on Aug 1, 2002 (gmt 0)

Nick

the text is too large.
here is the document content:

<head>
<title>Font test</title>
<style type="text/css">
h1 {
font: 2em arial, verdana;
}
.keywords {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
}
</style>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Opera Font test</h1>

<p class="keywords">This is text sized with keywords</p>

<P>This is text sized with normal P</P>
</body>

------------
here is the stylesheet content:

P { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: "xx-small"; }

Nick_W




msg:1201553
 12:40 pm on Aug 1, 2002 (gmt 0)

Well, I've tried it exactly as you have it and do not get this: I get exactly what you would expect.

I reckon you should have a good look through the preferences. I'll bet you have some settings that are overiding the styles.

Nick

jimmykav




msg:1201554
 12:47 pm on Aug 1, 2002 (gmt 0)

Okay, I might try and contact Opera.
The settings still on the default the ships with Opera. I downloaded it yesterday and have not configured it.

tedster




msg:1201555
 1:05 pm on Aug 1, 2002 (gmt 0)

Try removing the quotes from around xx-small. Opera is ignoring the declaration when you have quotes around it.

jimmykav




msg:1201556
 1:07 pm on Aug 1, 2002 (gmt 0)

Hi tedster
that was indeed the problem!

i pasted the code into the W3 CSS validator and it gave an error on the xx-small until i removed the quotes.

Thanks to both you and Nick for your assistance.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved