473,802 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE and other browsers: style-related questions

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
16 2991


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
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.annevankest eren.nl/>
Jul 20 '05 #3
*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
"Harlan Messinger" <h.*********@co mcast.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
theoreticall y) 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
On Thu, 8 Jan 2004 10:11:23 -0500, Harlan Messinger
<h.*********@co mcast.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
"Harlan Messinger" <h.*********@co mcast.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
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
"Rijk van Geijtenbeek" <ri**@opera.com > wrote in message
news:op******** ******@news.ind ividual.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

"Anne van Kesteren" <ma**@annevanke steren.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1849
by: Jenny | last post by:
I am doing research about realationship between sales rates and discounted prices or recommendation frequency. To do this, I need to access the database of commercial web sites via internet. I think this is possible because it it simmilar to the work of price comparison sites and web robot. I am studying python these days because I thinks it is a good language for the work. Actually I am a novice at python. I welcome any informaion...
9
6239
by: johkar | last post by:
I only have IE 6 and dial-up. Can you help me determine which browsers support this code? Thanks, John <html> <head> <title>Fixed Table Headers</title> <script language="JavaScript" type="text/javascript"> function fix(){
7
4159
by: Mad Scientist Jr | last post by:
Through messing around I got IE6 (win xp) to show/hide a table row. I gave my <TR> an ID of "trRow" and trRow.style.display='none'; hides it trRow.style.display='block'; displays it (will any value other than 'none' display on IE6?) I tried enclosing the <TR></TR> inside a <DIV> tag, and hiding that, but it doesn't work for some reason.
111
14435
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: <noscript> <meta http-equiv="refresh" content="1;url=http://yourURL/nojscript.html"> </noscript> This redirects to a doc which typically says "You need to enable
5
3000
by: JC | last post by:
hi all First of all, sorry for my (bad) english, I have a javascript: <script type="text/javascript"> <!-- function gointo(td,color){td.style.cursor='default';td.bgColor=color;} function gooutoff(td,color){td.style.cursor='default';td.bgColor=color;}
1
1905
by: cwdjrxyz | last post by:
I am now writing many new pages in xhtml 1.1. They are served as true xhtml by setting the mime type of the server to application/xhtml+xml for the .xhtml extension. Since IE6 and some earlier browsers can not handle this mime type, a simple php include is at the very top of such pages. If the mentioned mime type support for the viewing browser is detected, everything above the head tag of the page is written in xhtml 1.1 code. If the...
14
2489
by: Xah Lee | last post by:
is there somewhere i can find the default css for browsers? e.g. what's the usual rendering in terms of css for <p>, <ul> etc. in particular, right now i'm interested in creating a style similar to <ul> and <li>. Of course i can eyeball and come up with a css, but want to be sure. ----------
12
2554
by: Andy Jeffries | last post by:
Hi all, I want to write a function that given two elements will make their heights equal to the larger element. I've had a go at it and it works, but it makes both their heights larger than either of them (but equal) The code is as follows: var newheight = (second.offsetHeight > first.offsetHeight) ? second.offsetHeight :
6
2238
by: dee | last post by:
Here is a a list of my hyperlinks in my home page: <A class="theclass" href="Default.aspx">Home</A> <A class="theclass" href="Search.aspx">Search</A> <A class="theclass" href="Help.aspx">Help</A> And these are defined in Styles.css file: a.theclass:link, a.theclass:visited { display: block;
4
2512
by: wheelhouse5 | last post by:
I've got a file that uses the blendTrans style for a photo slideshow. It works fine with Internet Explorer, but not with any other browsers. What do I need??? Thanks, here's my slideshow code... // Set the slideshow speed (in milliseconds) var SlideShowSpeed = 3000; // Set the duration of crossfade (in seconds) var CrossFadeDuration = 3; function runSlideShow(){
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.