473,748 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font-family CSS property with IE6?

Is there a problem with the CSS font-family property with IE6 -
or is it my understanding of the font-family property?

I was under the impression that the browser tried to use the
first font. If it couldn't find that font it used the next on
the list and so on. If it couldn't find any on the list, prior
to the last it would use the last - which, as you can see is
sans-serif here.

When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.x psp1

"Trebuchet MS" and Verdana are both displayed without a problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

..dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++

Jul 20 '05 #1
9 8977
On Fri, 09 Jul 2004 16:07:07 +0100, Zenobia <6.**********@s pamgourmet.com>
wrote:
Is there a problem with the CSS font-family property with IE6 -
or is it my understanding of the font-family property?

I was under the impression that the browser tried to use the
first font. If it couldn't find that font it used the next on
the list and so on. If it couldn't find any on the list, prior
to the last it would use the last - which, as you can see is
sans-serif here.

When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.x psp1

"Trebuchet MS" and Verdana are both displayed without a problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++


1) Need more info than this, please post URL to an example of the problem.

2) My guess is that there's a font element overriding the CSS declaration.
Can't know for sure.

3) While we're on the subject of fonts, px or pt is a poor choice for
screen. % is best - 100% being the user's preferred reading size. Change
width to ems too. And span is inline, while p is block - you do know the
difference, right? BTW 0 distances don't use a measurement - so not 0px,
but just 0.

I recommend simplifying the test case, remove all styles but the
font-family, and see if the problem is replicated. If so, post URL to test
case.
Jul 20 '05 #2
Els
Zenobia wrote:
Is there a problem with the CSS font-family property with
IE6 - or is it my understanding of the font-family
property?

I was under the impression that the browser tried to use
the first font. If it couldn't find that font it used the
next on the list and so on. If it couldn't find any on the
list, prior to the last it would use the last - which, as
you can see is sans-serif here.

When I use the following style I get what I think is the
default system font - which is a SERIF font. Note that all
the fonts in the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family
property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.x psp1

"Trebuchet MS" and Verdana are both displayed without a
problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++


Do you have it uploaded somewhere?
It could be an error in the stylesheet just before the a.m.
style, which would make this style not get read, or it could
be in your html somewhere.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Ofra Haza - Im Nin'alu
Jul 20 '05 #3
On Fri, 9 Jul 2004, Zenobia wrote:
When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.
What are you going to achieve?
[sans-]serif is meaningless to Indic typefaces.
FONT-SIZE: 13px;


Don't do that!

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #4
On Fri, 09 Jul 2004 11:19:56 -0400, Neal <ne*****@yahoo. com> wrote:
Change width to ems too.


I meant % - though ems should be OK as well.
Jul 20 '05 #5
On Fri, 9 Jul 2004, I wrote:
Shruti is a Gujarati font and does not contain ASCII glyphs.


<http://www.alanwood.ne t/unicode/fonts_windows.h tml>
claims that Mangal, Raavi, shruti contain ASCII glyphs -
but they don't.

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #6
On Fri, 9 Jul 2004, I wrote:
Shruti is a Gujarati font and does not contain ASCII glyphs.


<http://www.alanwood.ne t/unicode/fonts_windows.h tml>
claims that Mangal, Raavi, shruti contain ASCII glyphs -


.... or perhaps not. Alan Wood writes

| Basic Latin (numerals and punctuation)

Perhaps he means

| Not Basic Latin but only numerals and punctuation

--
Top-posting.
What's the most irritating thing on Usenet?
Jul 20 '05 #7

This is a CSS question - might I suggest in future to redirect
the thread at an earlier stage when this happens? ta.
x-posted and f'ups proposed...

On Fri, 9 Jul 2004, Andreas Prilop wrote:
On Fri, 9 Jul 2004, Zenobia wrote:
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.


I'd never heard of it before, but a google search led me to a
collection of (allegedly) free fonts at computingbydsn, and I've
just tried installing it to see. MS Font Property Extensions
says the only supported Unicode range(s) is Gujarati, but Listfont
appears to show lots of stuff including Latin-1, Greek, Cyrillic and
so on - is this some artefact of font handling or what?
What are you going to achieve?


Presumably, it's meant to achieve what's described at
http://www.w3.org/TR/REC-CSS2/fonts....nt-family-prop

To deal with the problem that a single font may not contain glyphs to
display all the characters in a document, [...]
this property allows authors to specify a
list of fonts, all of the same style and size, that are tried in
sequence to see if they contain a glyph for a certain character. This
list is called a font set.

So, according to the CSS specification, this is /supposed/ to take
from Shruti whatever characters it contains, and for characters which
it does not contain, to use one of the fonts named later in the list.

How well supported that is across the available browsers is a topic
that has been discussed, at least in general terms, on a number of
previous occasions, with somewhat mixed conclusions. Don't you think
it'll work - in general - or in this case specifically?

If the original poster would provide a demonstration URL, then we
might make some progress (hint).

Incidentally, if I ask IE to configure a default font for Gujarati,
the only options it offers me are Arial Unicode MS, Code2000 (which I
installed for purely experimental reasons) and (now) Shruti. (Oh, and
for a monospaced font I get no choices whatever).

Of course the usual caveats about Verdana have to be repeated.[1]
FONT-SIZE: 13px;


Don't do that!


Agreed! With knobs on!!

[1] See e.g http://www.xs4all.nl/~sbpoley/webmatters/verdana.html

Jul 20 '05 #8
On 9 Jul 2004 15:20:00 GMT, Els <el*********@ti scali.nl> wrote:
Zenobia wrote:
Is there a problem with the CSS font-family property with
IE6 - or is it my understanding of the font-family
property?

I was under the impression that the browser tried to use
the first font. If it couldn't find that font it used the
next on the list and so on. If it couldn't find any on the
list, prior to the last it would use the last - which, as
you can see is sans-serif here.

When I use the following style I get what I think is the
default system font - which is a SERIF font. Note that all
the fonts in the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family
property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.x psp1

"Trebuchet MS" and Verdana are both displayed without a
problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++
Do you have it uploaded somewhere?


I can't give a URL because this is still being written.
It could be an error in the stylesheet just before the a.m.
style, which would make this style not get read, or it could
be in your html somewhere.


If I make one modification on this line, from:

font-family: Shruti, "Trebuchet MS", Verdana, Arial, Helvetica,
sans-serif;

to:

font-family: "Trebuchet MS", Verdana, Arial, Helvetica,
sans-serif;

then it's OK. I checked and my machine doesn't not have the
Shruti font installed.

I will look into Neal's suggestions.

Jul 20 '05 #9
On Fri, 9 Jul 2004 17:24:42 +0200, Andreas Prilop
<nh******@rrz n-user.uni-hannover.de> wrote:
On Fri, 9 Jul 2004, Zenobia wrote:
When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.


Ha. That's a good clue. Silly MS Word displays Shruti as
sans-serif (Verdana). That go me confused.
What are you going to achieve?
I was looking for the most attractive sans-serif font. I can't
find one with all the attibutes I like such as nice oval 0, a l
with a hint of a loop at the bottom, a g with a simple
descender, etc.
[sans-]serif is meaningless to Indic typefaces.
FONT-SIZE: 13px;


Don't do that!


OK. Thanks, people for your help. I'm clearly making lots of
mistakes with my CSS. I'll sort it out.

Jul 20 '05 #10

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

Similar topics

115
7222
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." Yet if I use 'x-small' instead of 9pt, I get bigger type on IE6 and smaller type on Mozilla. My choices seem to be:
4
16718
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
10
4048
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out the web page in question... http://clientserver.home.comcast.net/unicode.html If you examine, for a few examples, characters such as square root (&amp;#8730;), prime (&amp;#8242;) and double prime (&amp;#8243;).
9
3776
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with body like <br><br> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1>
4
3496
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a snippet from my .css file: *************************** body { margin:0; padding:0;
1
2726
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, btnCalculate.Font.Style | FontStyle.Bold);
17
2251
by: teser3 | last post by:
I can put out a Word Doc from PHP but if I try and manipulate the font size in the PHP part it outputs a blank Word Document. Here is what I have: <?php $fname="report.doc"; $handle = fopen( $fname, "rb" ); $buf = fread( $handle, filesize( $fname )); fclose( $handle ); $len = strlen( $buf );
27
3236
by: 1001 Webs | last post by:
I am trying to make my style sheet as compatible as possible and I'm getting a bit confused here. I've read that the best size for font-size would be 76.1%; due to shortcomings in the way both IE and Opera render that attribute. Is this correct?
16
1880
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have not been able to figure out a way that it can also produce a font. Thanks Carl
6
8849
by: Miro | last post by:
Is there a way to / or a mathematical formula to see if a font size is 'too big' for a label. I have a label that is docked to 'fill' a form, and I want to resize that font based on the width and height of the label. So far I have something like this on the Form_Resize event: Label2.Font = New Font(Label2.Font.Name, _ Label2.Size.Height - 100, Label2.Font.Style)
0
8983
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
8822
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
9528
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
9236
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...
1
6792
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
6072
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();...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2774
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.