f



CSS Fonts: Detect Font DPI use specific CSS

Hi All,

I've run into a bit of an interesting problem with CSS and font DPI and
would certainly welcome help.

Problem:
Page layout defined in CSS has font size issues (overlapping frames, text
overflowing out of popup window, etc) on a windows systems using 120dpi
fonts (large fonts), but everything looks perfect in 96dpi small fonts.

My question is this, is there a way to detect system font size and select an
appropriate CSS style for each case? The deployment is a "slideshow" like
courseware solution that is displayed in a popup window - overflow is not an
option as the window can not scroll.

Fonts sized at 8.5pt display perfectly in 96dpi but are much too large in
120dpi. The reason for using absolute a.o.2 relative type size is that
..bodycopy defines core type site-wide. If it is set to relative, type gets
insanely small in some cases.

If anyone knows of a solution or a possible method of detecting system font
dpi - not resolution - I would be very grateful.

Thanks in advance!

David


0
David
11/14/2004 1:45:42 AM
comp.authoring.stylesheets 8158 articles. 0 followers. mdmoura (161) is leader. Post Follow

39 Replies
734 Views

Similar Articles

[PageSpeed] 6

David Jubinville wrote:

> is there a way to detect system font size

No. But you can still work with that font size via the magical 1em.

font-size: 100%; /* this sets font size to 1em or exactly what the user
has configured on his or her system */

max-width: 10em; /* this sets the maximum width to 10 times the the
user's chosen font size */


-- 
Brian  (remove "invalid" to email me)
0
Brian
11/14/2004 3:12:56 AM
"David Jubinville" <djubinville@rogers.nospam.com> wrote in message 
news:t9ednTEeLIhaJQvcRVn-tw@rogers.com...
> Hi All,

> Fonts sized at 8.5pt display perfectly in 96dpi but are much too large in
> 120dpi. The reason for using absolute a.o.2 relative type size is that
> .bodycopy defines core type site-wide. If it is set to relative, type gets
> insanely small in some cases.
>
> If anyone knows of a solution or a possible method of detecting system 
> font
> dpi - not resolution - I would be very grateful.

I solved this problem (type gets insanely small) some time ago, using this 
technique:  instead of specifying font sizes using px or pt (which is bad 
for reasons I should not have to repeat), and instead of specifying font 
sizes using % or em (which is generally recommended, but which can result in 
the type too small problem), I instead use the standard CSS font sizes 
xx-small, x-small, small, medium, large, x-large, and xx-large. The default 
font size is medium (except for IE, for which it is small, but which can be 
circumvented using CSS trickery), and smaller sizes can be produced by 
dropping down to small, x-small, etc.

In my standard CSS file I typically do:

    @import  url(style_std.css);

and in the imported CSS file I have code of this form to set the font sizes:

    big                { font-size:small; voice-family: "\"}\""; 
voice-family:inherit; font-size:medium; }
    html, p, li       { font-size:x-small; voice-family: "\"}\""; 
voice-family:inherit; font-size:small; }
    small, code    { font-size:xx-small; voice-family: "\"}\""; 
voice-family:inherit; font-size:x-small; }

Antique browsers never see this (because of the @import); the first size 
specified after the '{' is for IE; the last size specified before the '}' is 
for standards-compliant browsers, with the voice-family trick to ensure that 
IE doesn't see it.






0
C
11/14/2004 3:41:27 AM
*C A Upsdell* <cupsdell0311XXX@-@-@XXXrogers.com>:
>
>     big                { font-size:small; voice-family: "\"}\"";
> voice-family:inherit; font-size:medium; }

In a geeky way, that's almost sig-worthy stupid.

-- 
"Show me a sane man and I will cure him." -- C.G. Jung
0
Christoph
11/14/2004 10:04:50 PM
C A Upsdell wrote:

> I solved this problem (type gets insanely small) some time ago,

There was no problem until you created one by specifying font size in
the first place.

> I instead use the standard CSS font sizes xx-small, x-small, small,
> medium, large, x-large, and xx-large. The default font size is medium
> (except for IE, for which it is small, but which can be circumvented
> using CSS trickery),

There is no need for such trickery. This is one part of css that is
pretty easy to nail. The only bug to worry about is margins, widths,
etc. specified in em units, and that only affects MSIE/Win. The solution
is to explicitly declare the correct font size for body:

body { font-size: 100% }

> and smaller sizes can be produced by dropping down to small, x-small,
> etc.

There is little need for any font size less than 100%, except perhaps
for legalese. And for that, you need not try to figure out css keywords.

..legalese { font-size: 90% }

-- 
Brian  (remove "invalid" to email me)
0
Brian
11/15/2004 8:42:39 PM
"Brian" <usenet3@julietremblay.com.invalid> wrote in message 
news:3x8md.911038$Gx4.375633@bgtnsc04-news.ops.worldnet.att.net...
>C A Upsdell wrote:
>
>> I solved this problem (type gets insanely small) some time ago,
>
> There was no problem until you created one by specifying font size in
> the first place.
>
>> I instead use the standard CSS font sizes xx-small, x-small, small,
>> medium, large, x-large, and xx-large. The default font size is medium
>> (except for IE, for which it is small, but which can be circumvented
>> using CSS trickery),
>
> There is no need for such trickery. This is one part of css that is
> pretty easy to nail. The only bug to worry about is margins, widths,
> etc. specified in em units, and that only affects MSIE/Win. The solution
> is to explicitly declare the correct font size for body:
>
> body { font-size: 100% }

> There is little need for any font size less than 100%, except perhaps
> for legalese. And for that, you need not try to figure out css keywords.

Wrong.  There can be many valid reasons to use a font size other than 100%. 
Legalese might be one of these reasons.  Other good reasons could be: 
superscripts, subscripts, small caps text, text to stand out by being 
larger, footnotes, sidenotes, sidebars, menus, captions, advertising, dense 
tables, etc., etc., etc.

> .legalese { font-size: 90% }

Which can result in the 'type gets insanely small' problem; whereas my 
equivalent suggestion -- .legalese { font-size:small; } -- does not.

IMO the important things are to (a) have font sizes that are scaled to the 
user's default font size, and (b) have font sizes that are readable.

 


0
C
11/15/2004 9:33:35 PM
In comp.infosystems.www.authoring.stylesheets  C A Upsdell said:

>> .legalese { font-size: 90% }

whats wrong with 100% and the other text 110%. why do people insist on
making text smaller than what the visitor prefers. could it be because
people are more concerned with how it looks rather than how readable it
is.

-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/15/2004 9:44:34 PM
C A Upsdell wrote:

>>.legalese { font-size: 90% }
> 
> Which can result in the 'type gets insanely small' problem; whereas my 
> equivalent suggestion -- .legalese { font-size:small; } -- does not.

Sure does on my pages.  90%, that is.

If it fails for you, you may not have body set at 100%.

> IMO the important things are to (a) have font sizes that are scaled to the 
> user's default font size, and (b) have font sizes that are readable.

...which is why we use percentages. A hundred of them. <g>

-- 
    -bts
    -This space intentionally left blank.
0
Beauregard
11/15/2004 9:53:10 PM
*brucie* <shit@usenetshit.info>:
>
>>> .legalese { font-size: 90% }
>
> whats wrong with 100% and the other text 110%.

The preferred font size set in the browser (100%) is for main text, that's  
what matters. I don't like bigger than necessary (main) text either.

> why do people insist on making text smaller
> than what the visitor prefers.

My feeling is you set your preferred font size too low, maybe to your  
minimal comfortable reading size. That would be your fault.

> could it be because people are more concerned with how it looks
> rather than how readable it is.

That's the people using 'font-size' with pixel values or 'body', 'p' etc.  
below 100%/1em/medium. You are once again over-sensitive.

Btw.: Using all lowercase and not the appropriate punctuation marks (for  
questions) doesn't enhance readability as well.

-- 
"Try to learn something about everything and everything about something."
                                                       Thomas H. Huxley
0
Christoph
11/15/2004 11:20:16 PM
In comp.infosystems.www.authoring.stylesheets  Christoph Paeper said:

>> why do people insist on making text smaller
>> than what the visitor prefers.

> My feeling is you set your preferred font size too low, 

theres nothing wrong with my font size. whats wrong is authors telling
me should really be 10% smaller. if i wanted it 10% smaller i would make
it 10% smaller.

> maybe to your minimal comfortable reading size. That would be your
> fault.

its the authors fault specifying 10% smaller than what i prefer, i know
what i prefer and its not 10% smaller than what i have. stop trying to
blame me.
 
> You are once again over-sensitive.

i don't like authors telling me what my font size should be (or how long
the lines of text should be). stop trying to control me.

> Btw.: Using all lowercase and not the appropriate punctuation marks (for  
> questions) doesn't enhance readability as well.

you have a killfile, use it. usenet was much better once i killfiled
myself.

-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/15/2004 11:37:46 PM
C A Upsdell wrote:
> "Brian" <usenet3@julietremblay.com.invalid> wrote in message 
> 
>> .legalese { font-size: 90% }
> 
> Which can result in the 'type gets insanely small' problem; whereas my 
> equivalent suggestion -- .legalese { font-size:small; } -- does not.

You are mistaken. % units do not trigger the "insanely small" text size
problem in WinIE. Only em units do.

Keyword sizes are a worse alternative, because of the inconsistent
rendering across browsers. Tis also a waste of time and effort to try to
work around these differences with hacks. % units work so nicely without
any special effort - they are the only sane solution.

-- 
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
0
kchayka
11/15/2004 11:45:38 PM
"Beauregard T. Shagnasty" <a.nony.mous@example.invalid> wrote in message 
news:az9md.9647$zk7.8184@twister.nyroc.rr.com...
>C A Upsdell wrote:
>
>>>.legalese { font-size: 90% }
>>
>> Which can result in the 'type gets insanely small' problem; whereas my 
>> equivalent suggestion -- .legalese { font-size:small; } -- does not.
>
> Sure does on my pages.  90%, that is.

Not if it is nested, which what the OP was concerned with.  90% of 90% of 
90% ... can quickly become too small to read, whereas font-size:small 
font-size:small font-size:small ... does not.





0
C
11/16/2004 12:51:22 AM
"kchayka" <usenet@c-net.us> wrote in message 
news:2vstebF2oggguU1@uni-berlin.de...
>C A Upsdell wrote:
>> "Brian" <usenet3@julietremblay.com.invalid> wrote in message
>>
>>> .legalese { font-size: 90% }
>>
>> Which can result in the 'type gets insanely small' problem; whereas my
>> equivalent suggestion -- .legalese { font-size:small; } -- does not.
>
> You are mistaken. % units do not trigger the "insanely small" text size
> problem in WinIE. Only em units do.

Wrong.  Once upon a time, I did use % units, and I did have endless 
shrinking text size problems (at least with some browsers), and switching to 
small, x-small, etc. stopped this problem for good.

> Keyword sizes are a worse alternative, because of the inconsistent
> rendering across browsers. Tis also a waste of time and effort to try to
> work around these differences with hacks.

The inconsistency is in IE, easily overcome.  And the CSS trickery which 
overcomes this inconsistency can be copied and pasted from site to site, 
changing only the selectors, as needed.





0
C
11/16/2004 1:04:11 AM
C A Upsdell wrote:
> "kchayka" <usenet@c-net.us> wrote in message 
> news:2vstebF2oggguU1@uni-berlin.de...
>>
>> % units do not trigger the "insanely small" text size
>> problem in WinIE. Only em units do.
> 
> Wrong.  Once upon a time, I did use % units, and I did have endless 
> shrinking text size problems

Caused by using a body text size smaller than 100%?

Doctor, it hurts when I do this...

-- 
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
0
kchayka
11/16/2004 1:11:45 AM
In comp.infosystems.www.authoring.stylesheets  C A Upsdell said:

>> You are mistaken. % units do not trigger the "insanely small" text size
>> problem in WinIE. Only em units do.

> Wrong.  

i disagree. i'm always coming across sites with the IE em bug. set your
font size to 'smallest' and you'll see it for yourself. using the same
size specified with % and theres no problems.

> Once upon a time, I did use % units, and I did have endless 
> shrinking text size problems (at least with some browsers), 

sounds like an inheritance issue with your css. i've never had any
problems using %.

> and switching to small, x-small, etc. stopped this problem for good.

the problem with keywords is that browsers don't use the same base size.
just as kchayka said.

> The inconsistency is in IE, easily overcome.  And the CSS trickery which 
> overcomes this inconsistency can be copied and pasted from site to site, 
> changing only the selectors, as needed.

or you could just use % and not fart around with unneeded hacks.

-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/16/2004 1:12:28 AM
C A Upsdell wrote:

> Wrong.  Once upon a time, I did use % units, and I did have endless
> shrinking text size problems (at least with some browsers)

Which? I'd like to know, as I've never encountered such issues.
0
Neal
11/16/2004 1:13:36 AM
C A Upsdell wrote:
> "Beauregard T. Shagnasty" wrote
> 90%, that is.
> Not if it is nested, which what the OP was concerned with.  90% of 90% of
> 90% ... can quickly become too small to read ...

So, apply font-size more logically.

Do you need to apply a 90% in a 90% in a 90%, ever? Normally, I set 
font-size for the body (at 100%) and set special things at say 90%. If you 
never nest this upon itself, you avoid the problem.

  think you're inventing an unrealistic problem.
0
Neal
11/16/2004 1:16:20 AM
*brucie* <shit@usenetshit.info>:
> Christoph Paeper said:
>
>> My feeling is you set your preferred font size too low,
>
> theres nothing wrong with my font size. whats wrong is authors telling
> me should really be 10% smaller.

Nobody (serious) advertised a font size smaller than 100% for the _main  
text_. I would not support a font size smaller than about 90% of the  
user's selected comfortable size for anything less important than the main  
text.

> i don't like authors telling me what my font size should be (or how long
> the lines of text should be). stop trying to control me.

Not everything has to be the same size, but the text that matters should  
be in the user's preferred size.

> you have a killfile,

No, I don't.

-- 
Useless Fact #1:
Barbie's measurements if she were life size: 39-23-33 [99-58-84].
0
Christoph
11/16/2004 1:20:03 AM
In comp.infosystems.www.authoring.stylesheets  Christoph Paeper said:

> Nobody (serious) advertised a font size smaller than 100% for the _main  
> text_. 

you want the content easy to read at the visitors preferred size but not
the navigation?

> I would not support a font size smaller than about 90% of the user's
> selected comfortable size for anything less important than the main
> text.

thankfully i can specify a minimum font size (100%) so i can read all
the text. often it causes horizontal scrolling or the design falls apart
but at least i can read it.

>> you have a killfile,
> No, I don't.

oh, i'll just shut up then.


-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/16/2004 1:33:14 AM
"kchayka" <usenet@c-net.us> wrote in message 
news:2vt2frF2nis53U1@uni-berlin.de...
>C A Upsdell wrote:
>> "kchayka" <usenet@c-net.us> wrote in message
>> news:2vstebF2oggguU1@uni-berlin.de...
>>>
>>> % units do not trigger the "insanely small" text size
>>> problem in WinIE. Only em units do.
>>
>> Wrong.  Once upon a time, I did use % units, and I did have endless
>> shrinking text size problems
>
> Caused by using a body text size smaller than 100%?
>
> Doctor, it hurts when I do this...

Then don't do this ...



0
C
11/16/2004 2:42:38 AM
"brucie" <shit@usenetshit.info> wrote in message 
news:1qb8jsffj7i1y.dlg@usenetshit.info...
> In comp.infosystems.www.authoring.stylesheets  C A Upsdell said:
>> and switching to small, x-small, etc. stopped this problem for good.
>
> the problem with keywords is that browsers don't use the same base size.
> just as kchayka said.

Please explain.  Are you simply referring to the IE problem, which as I have 
explained several times is easily overcome?

>> The inconsistency is in IE, easily overcome.  And the CSS trickery which
>> overcomes this inconsistency can be copied and pasted from site to site,
>> changing only the selectors, as needed.
>
> or you could just use % and not fart around with unneeded hacks.

I could use %:  but I would rather use something that works.




0
C
11/16/2004 2:49:11 AM
C A Upsdell wrote:
> "kchayka" <usenet@c-net.us> wrote in message 
> news:2vt2frF2nis53U1@uni-berlin.de...
>>
>> Doctor, it hurts when I do this...
> 
> Then don't do this ...

You think you're following your own advice?

You put a bandaid on it by using font-size keywords instead of %. But
you're only treating the symptoms, not the problem.

The symptoms are a progressively smaller font-size with nested elements.
The problem is setting explicit sizes less than 100%. Stop doing that
and the symptoms disappear. You won't need any silly hacks, either.

-- 
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
0
kchayka
11/16/2004 3:27:17 AM
"Neal" <neal413@yahoo.com> wrote in message 
news:opshi9oyim6v6656@news.individual.net...
>C A Upsdell wrote:
>
>> Wrong.  Once upon a time, I did use % units, and I did have endless
>> shrinking text size problems (at least with some browsers)
>
> Which? I'd like to know, as I've never encountered such issues.

A very worthy question.  Unfortunately I can't show you because I fixed all 
my live sites using the technique I have described.  I did find two old 
sites -- shut down and no longer on the web, but still on my PC -- which use 
the % technique and which have the shrinking text problem with NN4.80, 
IE5.01, IE5.5, and IE6.0 ... but NOT with Opera or Mozilla.  Moreover, the 
nature of the % problems suggests that they resulted from improper handling 
of inheritance by the troublesome browsers.

Although I can't show you the dead sites, I hope that you will believe me 
when I say that I have re-confirmed that such % problems exists in the 
sites, and that the problems occurred ONLY with certain browsers whose 
compliance with standards is (ahem!) not admirable.



0
C
11/16/2004 3:30:34 AM
"Neal" <neal413@yahoo.com> wrote in message 
news:opshi9tiz46v6656@news.individual.net...
>C A Upsdell wrote:
>> "Beauregard T. Shagnasty" wrote
>> 90%, that is.
>> Not if it is nested, which what the OP was concerned with.  90% of 90% of
>> 90% ... can quickly become too small to read ...
>
> So, apply font-size more logically.
>
> Do you need to apply a 90% in a 90% in a 90%, ever? Normally, I set 
> font-size for the body (at 100%) and set special things at say 90%. If you 
> never nest this upon itself, you avoid the problem.
>
>  think you're inventing an unrealistic problem.

Not inventing.  Note my response to another of your messages in which I 
confirmed the problem ... with some browsers.



0
C
11/16/2004 3:32:25 AM
"kchayka" <usenet@c-net.us> wrote in message 
news:2vtaduF2qu6i2U1@uni-berlin.de...
>C A Upsdell wrote:
>> "kchayka" <usenet@c-net.us> wrote in message
>> news:2vt2frF2nis53U1@uni-berlin.de...
> You put a bandaid on it by using font-size keywords instead of %. But
> you're only treating the symptoms, not the problem.

> The symptoms are a progressively smaller font-size with nested elements.
> The problem is setting explicit sizes less than 100%. Stop doing that
> and the symptoms disappear.

You misunderstand. The problem occurred only with sizes specified in % 
units.  And when I stopped using % units, in favour of my current method, 
the problem disappeared.  Moreover, the problem only occurred with certain 
browsers (look for details in another of my messages on this thread), and 
the pattern of the problems suggest that they were due to faulty handling of 
inheritance by these browsers.



0
C
11/16/2004 3:39:22 AM
In comp.infosystems.www.authoring.stylesheets  C A Upsdell said:

>>> Wrong.  Once upon a time, I did use % units, and I did have endless
>>> shrinking text size problems (at least with some browsers)

>> Which? I'd like to know, as I've never encountered such issues.

> A very worthy question.  Unfortunately I can't show you because I fixed all 
> my live sites using the technique I have described.  

just whip up a quick demo. heres the IE ems bug when the font size is
set to 'smallest':
http://moreshit.usenetshit.info/ickky-poo-font-size-thingy.shit

for those that don't have IE this is what it looks like:
http://moreshit.usenetshit.info/ickky-poo-font-size-thingy.png [1k]

what its supposed to look like:
http://moreshit.usenetshit.info/yummy-poo-font-size-thingy.png [1k]


-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/16/2004 5:34:34 AM
C A Upsdell wrote:
> "Neal" wrote
>> C A Upsdell wrote:
>>> I did use % units, and I did have endless
>>> shrinking text size problems
>>
>> Which?
>
> A very worthy question.  Unfortunately I can't show you... I hope that
> you will believe me
> when I say that I have re-confirmed that such % problems exists in the
> sites, and that the problems occurred ONLY with certain browsers whose
> compliance with standards is (ahem!) not admirable.

See, I use % exclusively, and I've never had such issues. I'd like to 
believe you, but my experience tells me otherwise.

Perhaps you can go into the kitchen and whip up a little demo?

0
Neal
11/16/2004 8:18:31 AM
On Mon, 15 Nov 2004 22:32:25 -0500, C A Upsdell 
<cupsdell0311XXX@-@-@XXXrogers.com> wrote:

> "Neal" <neal413@yahoo.com> wrote in message
> news:opshi9tiz46v6656@news.individual.net...
>> C A Upsdell wrote:
>>> "Beauregard T. Shagnasty" wrote
>>> 90%, that is.
>>> Not if it is nested, which what the OP was concerned with.  90% of 90% 
>>> of
>>> 90% ... can quickly become too small to read ...
>>
>> So, apply font-size more logically.
>>
>> Do you need to apply a 90% in a 90% in a 90%, ever? Normally, I set
>> font-size for the body (at 100%) and set special things at say 90%. If 
>> you
>> never nest this upon itself, you avoid the problem.
>>
>>  think you're inventing an unrealistic problem.
>
> Not inventing.  Note my response to another of your messages in which I
> confirmed the problem ... with some browsers.

I did a test - see http://users.rcn.com/neal413/fontsizetest.html - where 
I compare calculated percentages to what it should be. In each section 
we're comparing:

1) 81%
2) 90% nested in 90%
3) 100% (baseline)
4) 90% of 90% of 90%
5) 72.9%

1) and 2), and 3) and 4), should be the same size, one calculated in the 
browser, the other calculated by hand and set as a direct size.

The three sections themselves are 200%, 150%, and 100%. As you would 
expect, the browser has to do a lot of math to calculate a font size here.

Best results were seen in Firefox. I could not discern the direct 
percentage from the calculated percentage.

Next best - surprise - IE6. In the 200% * 72.9% div, it looks too small as 
compared to when IE calculate 200% * 90% * 90% * 90%. All others work out 
fine.

The worst was Opera 7.23. Browser calculations nearly always rendered 
smaller than the equivalent direct % size, the opposite of the one issue 
in IE.

However, the nesting I have done is intentionally heavy. I imagine the 
reasons for the size differences are due to how the browser rounds in its 
math. The sizes are not so drastically different that I suspect there's 
harm in my continuing to use % exclusively in my CSS font sizes. So long 
as we avoid heavy nesting, it should work out.

I'm interested in the observations of others and results in other 
browsers, or differences in the same browsers on other machines.
0
Neal
11/16/2004 8:46:42 AM
On Tue, 16 Nov 2004 03:46:42 -0500, Neal <neal413@yahoo.com> wrote:

> 1) and 2), and 3) and 4), should be the same size, one calculated in the 
> browser, the other calculated by hand and set as a direct size.

Correction - 1 and 2 should be the same, and 4 and 5 should be the same.
0
Neal
11/16/2004 8:53:11 AM
In comp.infosystems.www.authoring.stylesheets  Neal said:

> I did a test - see http://users.rcn.com/neal413/fontsizetest.html - where 
> I compare calculated percentages to what it should be. In each section 
> we're comparing:
> 
> 1) 81%
> 2) 90% nested in 90%
> 3) 100% (baseline)
> 4) 90% of 90% of 90%
> 5) 72.9%
> 
> 1) and 2), and 3) and 4), should be the same size, one calculated in the 
> browser, the other calculated by hand and set as a direct size.
> 
> The three sections themselves are 200%, 150%, and 100%. As you would 
> expect, the browser has to do a lot of math to calculate a font size here.
> 
> Best results were seen in Firefox. I could not discern the direct 
> percentage from the calculated percentage.
> 
> Next best - surprise - IE6. In the 200% * 72.9% div, it looks too small as 
> compared to when IE calculate 200% * 90% * 90% * 90%. All others work out 
> fine.

ummm.... thats just making my poor little head hurt. this is what it
looks like.

from left to right: opera7.6p3. FF1.0 and IE6
http://moreshit.usenetshit.info/font-size-thingy.png [11k]


-- 
the facts and opinions expressed by brucies 
l   i   t   t   l   e      v   o   i   c   e   s 
are not necessarily the same as those held by brucie.
0
brucie
11/16/2004 9:19:27 AM
in comp.infosystems.www.authoring.stylesheets, Neal wrote:
> C A Upsdell wrote:
> 
> > Wrong.  Once upon a time, I did use % units, and I did have endless
> > shrinking text size problems (at least with some browsers)
> 
> Which? I'd like to know, as I've never encountered such issues.

NN4. Unclosed P elements and percentage size. 

-- 
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
0
Lauri
11/16/2004 2:06:10 PM
"Neal" <neal413@yahoo.com> wrote in message 
news:opshjun4e06v6656@news.individual.net...
>>
>> Not inventing.  Note my response to another of your messages in which I
>> confirmed the problem ... with some browsers.
>
> I did a test - see http://users.rcn.com/neal413/fontsizetest.html - where 
> I compare calculated percentages to what it should be. In each section 
> we're comparing:
>
> 1) 81%
> 2) 90% nested in 90%
> 3) 100% (baseline)
> 4) 90% of 90% of 90%
> 5) 72.9%
>
> 1) and 2), and 3) and 4), should be the same size, one calculated in the 
> browser, the other calculated by hand and set as a direct size.

> I'm interested in the observations of others and results in other 
> browsers, or differences in the same browsers on other machines.

Okay, on my main PC:  NN4.08 and 4.80 had major problems; Opera 7.54, 
IE5.01, 5.5, and 6.0 had problems in the 3rd group; Mozilla was (to my eye) 
perfect.

Which basically confirms my earlier assertion that the % unit causes 
problems for some browsers.  Though your point is well taken that it may 
also depend on the PC.





0
C
11/16/2004 3:09:52 PM
"C A Upsdell" <cupsdell0311XXX@-@-@XXXrogers.com> wrote in message
news:NMCdnT4v_bCb0gTcRVn-qQ@rogers.com...
> "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> wrote in message
> news:az9md.9647$zk7.8184@twister.nyroc.rr.com...
> >C A Upsdell wrote:
> >
> >>>.legalese { font-size: 90% }
> >>
> >> Which can result in the 'type gets insanely small' problem; whereas my
> >> equivalent suggestion -- .legalese { font-size:small; } -- does not.
> >
> > Sure does on my pages.  90%, that is.
>
> Not if it is nested, which what the OP was concerned with.  90% of 90% of
> 90% ... can quickly become too small to read, whereas font-size:small
> font-size:small font-size:small ... does not.
>
Wow, someone who actually is still paying attention to the actual problem at
hand a.o.2 ripping into eachother...

In most cases, all applicable for that matter, I use relative type sizes.
However, in this case I am working on a site designed by someone else - some
one who knew nothing about web design, as esp. CSS.  There really is no easy
fix for this situation without re-codeing from scratch, something that is
not an option due to deadlines (this is internal corporate courseware).

This leaves me with the option that i've already reached - a user 'options'
screen allowing the user to select type sizes from a variety of CSS
documents (differing size/colour models). This is then set using JS and
served via a cookie. Easy, done.. dirty.

The reason it's done this way a.o.2 ASP or PHP site transformations is
because the courseware needs to operate as easily from a CD as from the
net - not possible with server technologies - so don't rag on me for that.

In the end, this is a quick fix better left to the annuls of time - the
whole thing is gonna get dropped into the template I've created for all
future projects.

Many thanks to those who remained somewhat on topic.

Regards,
David
>
>


0
news
11/16/2004 5:46:48 PM
in comp.infosystems.www.authoring.stylesheets, brucie wrote:
> In comp.infosystems.www.authoring.stylesheets  C A Upsdell said:

> > Once upon a time, I did use % units, and I did have endless 
> > shrinking text size problems (at least with some browsers), 
> 
> sounds like an inheritance issue with your css. i've never had any
> problems using %.

That is because you have not been stupid enaugh to use unclosed P 
elements and different than 100% font for in NN4. Irrelevant today, of 
course...
 


-- 
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
0
Lauri
11/17/2004 5:34:35 AM
C A Upsdell<cupsdell0311XXX@-> wrote:
> "kchayka" <usenet@c-net.us> wrote in message 
> news:2vstebF2oggguU1@uni-berlin.de...
> >
> > You are mistaken. % units do not trigger the "insanely small" text size
> > problem in WinIE. Only em units do.
> 
> Wrong.  Once upon a time, I did use % units, and I did have endless 
> shrinking text size problems (at least with some browsers), and switching to 
> small, x-small, etc. stopped this problem for good.

    I just discovered that my barely used copy of IE 5.5
treats the following selector:

    .footnote > * { font-size: 90%; }

as:

    * { font-size: 90%; }

which should do nicely to produce insanely small text. It
works as intended (or at least doesn't fail catastrophically)
if the selector is:

    .footnote>* { font-size: 90%; }


  --n
0
ISO
11/19/2004 6:38:47 AM
Nisse Engstr�m wrote:

> I just discovered that my barely used copy of IE 5.5 treats the
> following selector:
> 
>   .footnote > * { font-size: 90%; }

MSIE/Win does not understand child selectors, treating them as
descendent selectors instead. So this is parsed as

..footnote * { font-size: 90%; }


> as:
> 
>   * { font-size: 90%; }

Erm, not sure about that.

> which should do nicely to produce insanely small text.

Perhaps. Without testing, it seems that .footnote * would produce 90% in
the child of .footnote, and 90% of 90% in the grandchild, etc.

> It works as intended (or at least doesn't fail catastrophically) if
> the selector is:
> 
>   .footnote>* { font-size: 90%; }

What you mean is that it does not work at all, that it has no effect,
when you use that selector. That's because, as I wrote above, MSIE/Win
does not parse child selector. Thus, the ">" in that selector could be
any character, and MSIE seems to treat this as one string, as if it were
looking for an element where class="footnote>*".

-- 
Brian  (remove "invalid" to email me)
0
Brian
11/19/2004 7:29:57 PM
Brian<usenet3@julietremblay.com.invalid> wrote:
> Nisse Engstr=F6m wrote:
>=20
> > I just discovered that my barely used copy of IE 5.5 treats the
> > following selector:
> >=20
> >   .footnote > * { font-size: 90%; }
> >=20
> > as:
> >=20
> >   * { font-size: 90%; }
>=20
> Erm, not sure about that.

Test case:
  <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.html>
Screen shot:
  <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.png>

> > It works as intended (or at least doesn't fail catastrophically) if
> > the selector is:
> >=20
> >   .footnote>* { font-size: 90%; }
>=20
> What you mean is that it does not work at all, that it has no effect,
> when you use that selector.

    You're right there. I didn't test this much, which is
why I added the parenthesis above.

  --n
0
ISO
11/19/2004 10:17:31 PM
Nisse Engstr=F6m<PvovotkNOSPAM@tele2.se> wrote:
>=20
>     I just discovered that my barely used copy of IE 5.5
> treats the following selector:

    It seems I wasn't telling the whole truth there. That
should have been IE 5.0. The 5.5 was on some other computer.

Sorry about that.

  --n
0
ISO
11/19/2004 11:05:02 PM
Nisse Engstr�m wrote:
> Brian<usenet3@julietremblay.com.invalid> wrote:
> 
>>Nisse Engstr�m wrote:
>>
>>
>>>I just discovered that my barely used copy of IE 5.5 treats the
>>>following selector:
>>>
>>>  .footnote > * { font-size: 90%; }
>>>
>>>as:
>>>
>>>  * { font-size: 90%; }
>>
>>Erm, not sure about that.
> 
> 
> Test case:
>   <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.html>

I don't doubt that the fonts get progressively smaller. What I'm saying
is that .footnote > * is treated as .footnote *. That's different then
what you wrote, * .footnote, which would match <element
class="footnote"> where <element> was not the root, right?

BTW, I looked at your test case, but don't see any class="bogus". Have I
missed something?

> Screen shot:
>   <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.png>

Yep, I see it. (And thanks for making the screenshot small; I'm on
dialup, so large screenshots can be sort of a drag.) I was only
clarifying what MSIE parses.

-- 
Brian  (remove "invalid" to email me)
0
Brian
11/20/2004 6:34:12 PM
Brian<usenet3@julietremblay.com.invalid> wrote:
> Nisse Engstr=F6m wrote:
> > Test case:
> >   <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.html>
>=20
> I don't doubt that the fonts get progressively smaller. What I'm saying
> is that .footnote > * is treated as .footnote *. That's different then
> what you wrote, * .footnote, which would match <element
> class=3D"footnote"> where <element> was not the root, right?

    No, that's not quite what I wrote.=20

> BTW, I looked at your test case, but don't see any class=3D"bogus". Have =
I
> missed something?

    IF ".bogus > *" is treated as ".bogus *", then, unless
I'm irrevocably confused, the selector would match any
/descendant of .bogus/. But there /is no/ element with that
class, and the selector /still matches/.
    It seems to me that the selector matches /every/ element,
which is what I wrote upthread.

The ".bogus *" selector renders quite differently:
  <http://home.swipnet.se/sigsegv/tmp/IE-descend-selector.html>
  <http://home.swipnet.se/sigsegv/tmp/IE-descend-selector.png>

> > Screen shot:
> >   <http://home.swipnet.se/sigsegv/tmp/IE-child-selector.png>
>=20
> Yep, I see it. (And thanks for making the screenshot small; I'm on
> dialup, [...]

    Me too. But even if I weren't, I would still make an
effort to reduce their size. It's probably more pedantry
than courtesy. :-)

  --n
0
ISO
11/21/2004 10:32:47 AM
Reply: