473,830 Members | 2,040 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
16 2995
In article Peter Foti wrote:
"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 */
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

"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.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

*/
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
"Harlan Messinger" <h.*********@co mcast.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.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 */

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,s ans-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
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
In article Peter Foti wrote:
"Harlan Messinger" <h.*********@co mcast.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

"Lauri Raittila" <la***@raittila .cjb.net> wrote in message
news:MP******** *************** *@news.cis.dfn. de...
In article Peter Foti wrote:
"Harlan Messinger" <h.*********@co mcast.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

"Harlan Messinger" <h.*********@co mcast.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1853
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
14441
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
3001
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
1907
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
2491
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
2556
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
2247
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
2514
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
9780
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9641
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
10476
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
10520
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
10196
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9310
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...
0
6940
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();...
1
4408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.