By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,492 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,492 IT Pros & Developers. It's quick & easy.

IE and other browsers: style-related questions

P: n/a
1. CSS has five generic font family specifiers: serif, sans-serif, cursive,
fantasy, monospace. IE lets the users select a default proportional font and
a default monospace font. Is there any way in IE for a user to indicate more
specifically what his preferred fonts are for serif and sans-serif,
respectively (at least, if not cursive and fantasy as well)? Do other
browsers allow a default font to be specified for all five of these generic
specifiers?

2. I just noticed that, with no fixed font-size specifiers in my style
sheet, IE6 nevertheless does not change the size of the lettering on form
controls when I change the text size in the browser. The rest of the text on
the page grows or shrinks as it should, but not the labels on buttons or the
content of input fields. Adding

input, select, textarea {font-size: 100%; }

to my style sheet solves the problem. But do I have to resort to that, or is
there something else that can be causing the problem in the first place? Do
any other (current) browsers exhibit this problem?

3. Regarding what I just read here about the Verdana issue, which was
enlightening (I'm adding to my inventory of suggestions to clients for new
web site designs that they not specify font family beyond the generics, if
possible): There are lots of rules regarding precedence of competing styles
in the cascade, and for the partial or complete ignoring of rules that can't
be satisfied. At some point I should get to know them, but for the time
being I wondered whether someone has a ready answer for this question: In
order to provide properly sized Verdana for people who have it, without
having the font appear too small for people who don't, would (in reality or
theoretically) any of these work?

body { font: 85% Verdana; font: 100% sans-serif; }

or

body { font: 100% sans-serif; font: 85% Verdana; }

or

body { font: 100% sans-serif; }
body { font: 85% Verdana; }

or

body { font: 85% Verdana; }
body { font: 100% sans-serif; }

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.

Jul 20 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a


Harlan Messinger wrote:
1. CSS has five generic font family specifiers: serif, sans-serif, cursive,
fantasy, monospace. Do other
browsers allow a default font to be specified for all five of these generic
specifiers?


Netscape 7.1 allows to set
Proportional
Serif
Sans-serif
Cursive
Fantasy
Monospace
under Preferences->Appearance->Fonts.
Should also be possible with other Mozilla based browsers.

Opera 7.20 allows to set
CSS font-family serif
CSS font-family sans-serif
... cursive
... fantasy
... monospace
under Preferences->Fonts
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

P: n/a
Harlan Messinger wrote:
1. CSS has five generic font family specifiers: serif, sans-serif, cursive,
fantasy, monospace. IE lets the users select a default proportional font and
a default monospace font. Is there any way in IE for a user to indicate more
specifically what his preferred fonts are for serif and sans-serif,
respectively (at least, if not cursive and fantasy as well)? Do other
browsers allow a default font to be specified for all five of these generic
specifiers?
IE does not. And I just checked with Mozilla (1.7a), it does.
2. I just noticed that, with no fixed font-size specifiers in my style
sheet, IE6 nevertheless does not change the size of the lettering on form
controls when I change the text size in the browser. The rest of the text on
the page grows or shrinks as it should, but not the labels on buttons or the
content of input fields. Adding

input, select, textarea {font-size: 100%; }

to my style sheet solves the problem. But do I have to resort to that, or is
there something else that can be causing the problem in the first place? Do
any other (current) browsers exhibit this problem?
Example page, URI? Quirks or standard mode?
3. Regarding what I just read here about the Verdana issue, which was
enlightening (I'm adding to my inventory of suggestions to clients for new
web site designs that they not specify font family beyond the generics, if
possible): There are lots of rules regarding precedence of competing styles
in the cascade, and for the partial or complete ignoring of rules that can't
be satisfied. At some point I should get to know them, but for the time
being I wondered whether someone has a ready answer for this question: In
order to provide properly sized Verdana for people who have it, without
having the font appear too small for people who don't, would (in reality or
theoretically) any of these work?


Nope.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #3

P: n/a
*Harlan Messinger*:

Is there any way in IE for a user to indicate more specifically
what his preferred fonts are for serif and sans-serif, respectively
(at least, if not cursive and fantasy as well)?
I don't know any. That in combination with the bad presets and some bugs has
made generic font families almost unusable.
Do other browsers allow a default font to be specified for all five of these generic
specifiers?
Yes, Opera for example. The presets are not good either.
In order to provide properly sized Verdana for people who have it, without
having the font appear too small for people who don't, would (in reality or
theoretically) any of these work?
No.
body { font: 85% Verdana; font: 100% sans-serif; }


This and the following examples would all work in the same way: the latter
specified rule wins. 'font-size-adjust' would be (close to) a solution, if
it was implemented not only in Mozilla for Windows.

Conclusion: Don't use Verdana.
By the way, Verdana like many other Microsoft "Web" fonts gets the
typographical or curly quote signs wrong, which isn't that notable with the
English pair, but really ugly in many other languages.

--
"You're basically killing each other to see
who's got the better imaginary friend."
Rich Jeni on war vs. religion
Jul 20 '05 #4

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote:
3. Regarding what I just read here about the Verdana issue, which was
enlightening (I'm adding to my inventory of suggestions to clients for new
web site designs that they not specify font family beyond the generics, if
possible): There are lots of rules regarding precedence of competing styles
in the cascade, and for the partial or complete ignoring of rules that can't
be satisfied. At some point I should get to know them, but for the time
being I wondered whether someone has a ready answer for this question: In
order to provide properly sized Verdana for people who have it, without
having the font appear too small for people who don't, would (in reality or
theoretically) any of these work?

body { font: 85% Verdana; font: 100% sans-serif; }

or

body { font: 100% sans-serif; font: 85% Verdana; }

or

body { font: 100% sans-serif; }
body { font: 85% Verdana; }

or

body { font: 85% Verdana; }
body { font: 100% sans-serif; }


Theory and reality are in agreement here: None of those will work as
you want. In every case the second style specified will be applied and
the first ignored. So in the first and last cases the user will get
100% text in whatever their generic sans-serif font is. In the middle
two cases the user will get 85% text either Verdana or in their
default font.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #5

P: n/a
On Thu, 8 Jan 2004 10:11:23 -0500, Harlan Messinger
<h.*********@comcast.net> wrote:
1. CSS has five generic font family specifiers: serif, sans-serif,
cursive,
fantasy, monospace. IE lets the users select a default proportional font
and
a default monospace font. Is there any way in IE for a user to indicate
more
specifically what his preferred fonts are for serif and sans-serif,
respectively (at least, if not cursive and fantasy as well)? Do other
browsers allow a default font to be specified for all five of these
generic specifiers?
Firebird allows you to set 'Serif', 'Sans-serif' and 'Monospace' in its
fonts prefs, these will be used when generic families are used. You can
then choose between 'Serif' and 'Sans serif' for your normal text. Mozilla
is much the same, but it adds 'Cursive' and 'Fantasy' to the fonts prefs.
You can't set 'Fantasy' of 'Cursive' in Firebirds interface, it choose
'Ahem' and 'Comic Sans MS' for me. 'Ahem' is a CSS metrics test font, and
makes text unreadably...

Opera provides font prefs for all five generic font families, and
separately for normal text and monospaced text when no generic font family
is used in css.
2. I just noticed that, with no fixed font-size specifiers in my style
sheet, IE6 nevertheless does not change the size of the lettering on form
controls when I change the text size in the browser. The rest of the
text on
the page grows or shrinks as it should, but not the labels on buttons or
the
content of input fields. Adding

input, select, textarea {font-size: 100%; }

to my style sheet solves the problem. But do I have to resort to that,
or is there something else that can be causing the problem in the first
place? Do any other (current) browsers exhibit this problem?
Opera adds separate prefs for the initial size of text on form controls,
but Opera's zooming doesn't care anyway and scales everything on a page.
Mozilla and Firebird also scale the form controls together with the normal
text.

3. [..] be satisfied. At some point I should get to know them, but for
the time
being I wondered whether someone has a ready answer for this question: In
order to provide properly sized Verdana for people who have it, without
having the font appear too small for people who don't, would (in reality
or
theoretically) any of these work?
...
body { font: 100% sans-serif; }
body { font: 85% Verdana; }

Nice idea, but it doesn't work. A browser will recognize the second rule
even if it doesn't have access to a font names 'Verdana'. You'll get 85%
+ 'sans-serif' in MSIE (wrongly), and 85% + 'default font' in Opera,
Mozilla and Firebird, but you can't get 100% + 'sans-serif' this way.

You can get the MSIE fallback in Opera and Mozilla if you set 'sans-serif'
on a higher level:

html { font: 100% sans-serif; }
body { font: 100% sans-serif; }
body { font: 85% Verdana; }
You can avoid the 85% Times New Roman problem with this workaround.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #6

P: n/a
"Harlan Messinger" <h.*********@comcast.net> writes:
1. CSS has five generic font family specifiers: serif, sans-serif, cursive,
fantasy, monospace. IE lets the users select a default proportional font and
a default monospace font. Is there any way in IE for a user to indicate more
specifically what his preferred fonts are for serif and sans-serif,
respectively (at least, if not cursive and fantasy as well)? Do other
browsers allow a default font to be specified for all five of these generic
specifiers?


Galeon and Netscape 7 (Gecko based) let you specify all five.
Probably therefore it can be done in most other gecko-based browsers,
with varying degrees of ease.

Opera (version 7 at least) likewise, ISTR earlier versions having
similar features.

--
Chris
Jul 20 '05 #7

P: n/a
On Thu, 8 Jan 2004, Harlan Messinger wrote:
1. CSS has five generic font family specifiers: serif, sans-serif, cursive,
fantasy, monospace. IE lets the users select a default proportional font and
a default monospace font.
Have you been reading the discussions on this? There's been some
indication that the browser (ahem, "operating system component") makes
different choices depending on whether there is any CSS font family
specification in effect, or none. E.g that the CSS generic font
family specification of monospace overrides whatever the user had
configured as monospace in their browser preferences.
2. I just noticed that, with no fixed font-size specifiers in my style
sheet, IE6 nevertheless does not change the size of the lettering on form
controls when I change the text size in the browser. The rest of the text on
the page grows or shrinks as it should, but not the labels on buttons or the
content of input fields.
Possibly the size is implied internally in pixels or some other unit
that's not amenable to the browser's text size controls. So you're
seeing the same IE usability problem which happens when misguided
authors specify fonts in px or pt units, etc.
Adding

input, select, textarea {font-size: 100%; }

to my style sheet solves the problem. But do I have to resort to that,


That sort-of confirms the hypothesis.

As for the other questions you posed, I'm going to have to offer the
same negative answers that you got from several other regular
contributors already.
Jul 20 '05 #8

P: n/a
"Rijk van Geijtenbeek" <ri**@opera.com> wrote in message
news:op**************@news.individual.net...
body { font: 100% sans-serif; }
body { font: 85% Verdana; }

Nice idea, but it doesn't work. A browser will recognize the second rule
even if it doesn't have access to a font names 'Verdana'. You'll get 85%
+ 'sans-serif' in MSIE (wrongly), and 85% + 'default font' in Opera,
Mozilla and Firebird, but you can't get 100% + 'sans-serif' this way.


Does anyone know if the CSS working group has any plans to add means for
specifying the font family and size to be interpreted as a whole instead of
individually? Since font size seems to be very dependent upon the font
family, it seems logical to me that there should be some way of specifying
the combination. For example:

body { font-size-family: 85% Verdana; }

Which could be preceeded by a fallback case:

body { font: 100% sans-serif; }
body { font-size-family: 85% Verdana; } /* Only applied if family exists */

I haven't checked the CSS working group in a while... not sure if there's
anything like this in the works, but it seems to me that something like this
could be very useful.

Regards,
Peter Foti
Jul 20 '05 #9

P: n/a

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bt**********@reader10.wxs.nl...

Thanks for your responses to 1 and 3. Regarding 2:
Harlan Messinger wrote:
2. I just noticed that, with no fixed font-size specifiers in my style
sheet, IE6 nevertheless does not change the size of the lettering on form controls when I change the text size in the browser. The rest of the text on the page grows or shrinks as it should, but not the labels on buttons or the content of input fields. Adding

input, select, textarea {font-size: 100%; }

to my style sheet solves the problem. But do I have to resort to that, or is there something else that can be causing the problem in the first place? Do any other (current) browsers exhibit this problem?


Example page, URI? Quirks or standard mode?


Strict. The HTML didn't validate before, but I just made it validate. (As
you can see, the page is built from components borrowed from a variety of
sites.) See:

http://mywebpages.comcast.net/hmessi...ollection.html
http://mywebpages.comcast.net/hmessi...llection2.html

The first uses harlan.css, which has the explicit font size set for input,
select, and textarea. The second uses harlan2.css, which doesn't.
Jul 20 '05 #10

P: n/a
In article Peter Foti wrote:
"Rijk van Geijtenbeek" <ri**@opera.com> wrote in message
news:op**************@news.individual.net...
body { font: 100% sans-serif; }
body { font: 85% Verdana; }

Nice idea, but it doesn't work. A browser will recognize the second rule
even if it doesn't have access to a font names 'Verdana'. You'll get 85%
+ 'sans-serif' in MSIE (wrongly), and 85% + 'default font' in Opera,
Mozilla and Firebird, but you can't get 100% + 'sans-serif' this way.


Does anyone know if the CSS working group has any plans to add means for
specifying the font family and size to be interpreted as a whole instead of
individually? Since font size seems to be very dependent upon the font
family, it seems logical to me that there should be some way of specifying
the combination. For example:

body { font-size-family: 85% Verdana; }

Which could be preceeded by a fallback case:

body { font: 100% sans-serif; }
body { font-size-family: 85% Verdana; } /* Only applied if family exists */
http://www.w3.org/TR/CSS2/fonts.html

So it is possible in CSS2 using absolute units. Don't ask me why not
relative units, I don't know.
I haven't checked the CSS working group in a while... not sure if there's
anything like this in the works, but it seems to me that something like this
could be very useful.


Don't know anything about future plans.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #11

P: n/a

"Lauri Raittila" <la***@raittila.cjb.net> wrote in message
news:MP************************@news.cis.dfn.de...
In article Peter Foti wrote:
"Rijk van Geijtenbeek" <ri**@opera.com> wrote in message
news:op**************@news.individual.net...
> body { font: 100% sans-serif; }
> body { font: 85% Verdana; }
Nice idea, but it doesn't work. A browser will recognize the second rule even if it doesn't have access to a font names 'Verdana'. You'll get 85% + 'sans-serif' in MSIE (wrongly), and 85% + 'default font' in Opera,
Mozilla and Firebird, but you can't get 100% + 'sans-serif' this way.
Does anyone know if the CSS working group has any plans to add means for
specifying the font family and size to be interpreted as a whole instead of individually? Since font size seems to be very dependent upon the font
family, it seems logical to me that there should be some way of specifying the combination. For example:

body { font-size-family: 85% Verdana; }

Which could be preceeded by a fallback case:

body { font: 100% sans-serif; }
body { font-size-family: 85% Verdana; } /* Only applied if family exists

*/
http://www.w3.org/TR/CSS2/fonts.html

They recited the formula for "aspect" backwards, "font size divided by
x-height", but applied the correct formula in getting the aspect of Verdana
to be 0.58 given that when the font size is 100 units, the x-height is 58.

How can the typical web author find out what the aspect is for a font?
So it is possible in CSS2 using absolute units. Don't ask me why not
relative units, I don't know.

I didn't see where it implied that font-size-adjust wouldn't work for
relative units.

Jul 20 '05 #12

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote in message
news:bt************@ID-114100.news.uni-berlin.de...

"Lauri Raittila" <la***@raittila.cjb.net> wrote in message
news:MP************************@news.cis.dfn.de...
In article Peter Foti wrote:
"Rijk van Geijtenbeek" <ri**@opera.com> wrote in message
news:op**************@news.individual.net...
> > body { font: 100% sans-serif; }
> > body { font: 85% Verdana; }
>
>
> Nice idea, but it doesn't work. A browser will recognize the second rule > even if it doesn't have access to a font names 'Verdana'. You'll get 85% > + 'sans-serif' in MSIE (wrongly), and 85% + 'default font' in Opera,
> Mozilla and Firebird, but you can't get 100% + 'sans-serif' this way.
Does anyone know if the CSS working group has any plans to add means for specifying the font family and size to be interpreted as a whole instead
of
individually? Since font size seems to be very dependent upon the
font family, it seems logical to me that there should be some way of specifying the combination. For example:
body { font-size-family: 85% Verdana; }

Which could be preceeded by a fallback case:

body { font: 100% sans-serif; }
body { font-size-family: 85% Verdana; } /* Only applied if family

exists */

http://www.w3.org/TR/CSS2/fonts.html

They recited the formula for "aspect" backwards, "font size divided by
x-height", but applied the correct formula in getting the aspect of

Verdana to be 0.58 given that when the font size is 100 units, the x-height is 58.

How can the typical web author find out what the aspect is for a font?

An excellent point. I think the W3 is making the solution out to be
something unrealistic. In addition, their solution is NOT backwards
compatible. Here's why:

If a user agent doesn't support font-size-adjust (I assume that pre-CSS2
browsers don't), and they have style definitions such as:

/* Substitute SOMEVALUE with actual value, whatever that may be */
body {font: 85% verdana,arial,sans-serif; }
body {font-size-adjust: SOMEVALUE; }

Then the 85% will be applied to the Arial font if no Verdana installed (or
to sans-serif if no Arial either). My proposal would be to create a new
property, such that if it was not supported would not break backwards
compatibility (or at least, break compatibility in a more friendly way).
For example, the solution I suggested previously:

body { font: 100% arial,sans-serif; }
body { font-size-family: 85% Verdana; }

Assuming the browser doesn't support font-size-adjust or font-size-family:
With font-size-adjust, the small size of the wrong font will be applied.
With font-size-family, the client *could* have Verdana installed, but would
display 100% arial instead. Personally, I think this second option is more
user friendly, because presumably, 100% Arial is acceptable for those who
DON'T have Verdan installed, whereas 85% Arial is probably UN-acceptable.

So it is possible in CSS2 using absolute units. Don't ask me why not
relative units, I don't know.

I didn't see where it implied that font-size-adjust wouldn't work for
relative units.


Me either. It think she was wrong regarding that point (it would make no
sense to include a limitation like that... then again, the proposed solution
doesn't make much sense anyway since it requires insane knowledge of font
aspect ratios).

Regards,
Peter Foti
Jul 20 '05 #13

P: n/a
In article Harlan Messinger wrote:

"Lauri Raittila" <la***@raittila.cjb.net> wrote in message

http://www.w3.org/TR/CSS2/fonts.html


They recited the formula for "aspect" backwards, "font size divided by
x-height", but applied the correct formula in getting the aspect of Verdana
to be 0.58 given that when the font size is 100 units, the x-height is 58.

How can the typical web author find out what the aspect is for a font?


Testing.
So it is possible in CSS2 using absolute units. Don't ask me why not
relative units, I don't know.

I didn't see where it implied that font-size-adjust wouldn't work for
relative units.


I meaned combining family and size, what you asked. Using @font-face
thingy.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #14

P: n/a
In article Peter Foti wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote:

I didn't see where it implied that font-size-adjust wouldn't work for
relative units.


Me either. It think she was wrong regarding that point (it would make no
sense to include a limitation like that... then again, the proposed solution
doesn't make much sense anyway since it requires insane knowledge of font
aspect ratios).


Should have included this in first post, but forgot:
http://www.w3.org/TR/CSS2/fonts.html#descdef-font-size
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #15

P: n/a

"Lauri Raittila" <la***@raittila.cjb.net> wrote in message
news:MP************************@news.cis.dfn.de...
In article Peter Foti wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote:

I didn't see where it implied that font-size-adjust wouldn't work for
relative units.


Me either. It think she was wrong regarding that point (it would make no sense to include a limitation like that... then again, the proposed solution doesn't make much sense anyway since it requires insane knowledge of font aspect ratios).


Should have included this in first post, but forgot:
http://www.w3.org/TR/CSS2/fonts.html#descdef-font-size


This is from a related but separate part of the spec: font selection (15.3),
versus font specification (15.2). Without looking too closely into the
distinction, font selection involves font descriptions created using the
@font-face at-rule, and descriptors that have the same names as the
corresponding font-related CSS properties. The section you site applies to
the descriptor called "font-size".

Jul 20 '05 #16

P: n/a

"Harlan Messinger" <h.*********@comcast.net> wrote in message
news:bt************@ID-114100.news.uni-berlin.de...

This is from a related but separate part of the spec: font selection (15.3), versus font specification (15.2). Without looking too closely into the
distinction, font selection involves font descriptions created using the
@font-face at-rule, and descriptors that have the same names as the
corresponding font-related CSS properties. The section you site applies to
the descriptor called "font-size".


In your earlier posting, you only gave the URL for the entire page on fonts,
and when I searched for "font-size-adjust", I came to the first reference,
which was the one under font specification (15.2). Now I realize you many
have been referring to 15.3 (font selection) all along.

Jul 20 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.