473,738 Members | 9,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE font-size

I have a site up and running (www.solsoft.gr). I tested it with FF2 and
IE6 and works ok with some IE hacks.

Ok the CSS isn't good cause I started designing it with another look and
the customer ended up wanting a 3-column layout.

Now I see that IE7 mess things up. First of all there's a left margin
which I don't know why it exists. Secondly when I see the page the fonts
are way too big. I first had body{font-size:0.62em} but now changed it
to 11px. If I reload the page (in IE7) the fonts shows good. But why do
I have to reload? (I don't override the CSS with IE7).

Any help is appreciated.

thanks
Dec 4 '06
24 5343
..oO(VK)
>Bergamot wrote:
>*extremely* huge letters can result in IE when fonts are set in em
units. It's a well-known bug. Use % units instead (100% for normal
paragraph text) and font scaling is more rational.

IE's font scaling is very rational taking into account that its Font
Size switch has only five grades: Largest, Larger, Medium (default),
Smaller, Smaller - against of 14-20 grades on other UAs. This way it's
pre-programmed to make bigger "jumps" on size switch.
It's still a bug. A font size of 1.5em should be equal to 150%, but IE
gets it wrong for any other setting than Medium.
>If you're so concerned about the type size, stay away from Verdana or other fonts
that have a larger than average aspect ratio.

Sorry to say, but what a strange (softest to say) advise.
It's a good advice. Why do many people reduce the font size in their
stylesheets to something around 80%? Because often they use Verdana,
which appears much bigger than other fonts (for example Trebuchet),
where resizing would not be necessary at all.

Micha
Dec 5 '06 #11
VK wrote:
>
If one really wants to use %% then don't forget to add custom size
switch on the page for IE users.
That is very poor advice. Browsers already have a means to adjust the
type size to the user's liking. If you leave body text font-size at 100%
(the user's own default value) the likelihood they will need to adjust
the size at all is slim to none.

It does not benefit the user in any way to implement a custom font size
adjustment function. If you really want to help them, then send them to
a page that explains how to change the font size in their browser. That
is something they can use anywhere, not just at one site.
>If you're so concerned about the type size, stay away from Verdana or other fonts
that have a larger than average aspect ratio.

Sorry to say, but what a strange (softest to say) advise.
No, it isn't. The subject of Verdana has been done to death. I have no
interest in dredging it up again, either and I'm sure the regulars here
cringe at the thought of hearing it again, too. Go search the google
archives if you want to read more discussions on it.

--
Berg
Dec 5 '06 #12
VK

Michael Fesser wrote:
A font size of 1.5em should be equal to 150%
Really? Says who? MSDN explains it better and cleaner but "there is no
trust to Microsoft" :-) so here the original W3C stuff:

<http://www.w3.org/TR/CSS21/syndata.html#va lue-def-percentage>
Percentage values are always relative to another value, for example a
length. Each property that allows percentages also defines the value to
which the percentage refers. The value may be that of another property
for the same element, a property for an ancestor element, or a value of
the formatting context (e.g., the width of a containing block). When a
percentage value is set for a property of the root element and the
percentage is defined as referring to the inherited value of some
property, the resultant value is the percentage times the initial value
of that property.

<http://www.w3.org/TR/CSS21/syndata.html#va lue-def-length>
The 'em' unit is equal to the computed value of the 'font-size'
property of the element on which it is used. The exception is when 'em'
occurs in the value of the 'font-size' property itself, in which case
it refers to the font size of the parent element.

So what is so equal in here? IE implements much shorter font size
switch scale (Largest-Larger-Medium-Smaller-Smallest) and respectively
bigger size jumps for body font (which is used to calculate the actual
1em value).

At the same time they give %% attached to the *initial* body font size
(when the switch is on Medium) which is their holly right. That allows
to implement custom font size switch with as many positions as one
wants.

But simply breaking the default switch without providing an alternate
one is a very bad practice, especially now with monitors going bigger
and bigger.
Why do many people reduce the font size in their
stylesheets to something around 80%? Because often they use Verdana,
which appears much bigger than other fonts (for example Trebuchet),
where resizing would not be necessary at all.
Not sure what are you talking about. At the time of no CSS at all we
still had to declare <font face="Times New Roman, serif" size="3">
but
<font face="Arial, sans-serif" size="2">
to make them close by size looking on Windows (Arial size 3 was too
near of Times size 3; Times size 2 was too small to read with comfort).
I don't know why Verdana (which is an excellent font specially designed
for the Web) is being chosen as "blame it for everything" :-)

Dec 5 '06 #13
VK
If you're so concerned about the type size, stay away from Verdana or other fonts
that have a larger than average aspect ratio.
Sorry to say, but what a strange (softest to say) advise.

No, it isn't. The subject of Verdana has been done to death.
As well as "em bug on IE" I presume ;-) - otherwise it wouldn't be
called "well known bug" in this thread when it is not a bug and it is
not known AFAIK anywhere else outside of ciwas.

Dec 5 '06 #14
..oO(VK)
>Michael Fesser wrote:
>A font size of 1.5em should be equal to 150%

Really? Says who?
Simple logic. Obviously 2em should be twice as big as 1em and 200% is
twice as big as 100%.
>I don't know why Verdana (which is an excellent font specially designed
for the Web) is being chosen as "blame it for everything" :-)
http://www.xs4all.nl/~sbpoley/webmatters/verdana.html

Micha
Dec 5 '06 #15
In article <i6************ *************** *****@4ax.com>,
Michael Fesser <ne*****@gmx.de wrote:
...Why do many people reduce the font size in their
stylesheets to something around 80%? Because often they use Verdana,
which appears much bigger than other fonts (for example Trebuchet),
where resizing would not be necessary at all.
More website makers than you can poke a stick at use 80% or
thereabouts for non Verdana too. It is extremely annoying. They
do it because others do it and things look strangely big to them
when fonts are sensibly set (at 1em/100%) for main body text.
Plus they can't get as much crammed into their pages. What the
hell is up with these people who are hell bent on cramming the
contents of the universe into single pages?

--
dorayme
Dec 5 '06 #16
VK wrote:
Michael Fesser wrote:
>A font size of 1.5em should be equal to 150%

Really? Says who?
You seem to be confused.

Where font-size is concerned, em and % are equivalent. 1em = 100%. Both
are computed values, based on the font-size of the parent element, which
is initially the user's default size, *whatever that may be*.
<http://www.w3.org/TR/CSS21/syndata.html#va lue-def-percentage>
Percentage values are always relative to another value,
And in the case of font-size, it's relative to the font-size of the
parent element. The initial value is equivalent to 1em.
<http://www.w3.org/TR/CSS21/syndata.html#va lue-def-length>
The 'em' unit is equal to the computed value of the 'font-size'
property of the element on which it is used.
Same thing, except it's called em instead of %.
So what is so equal in here? IE implements much shorter font size
switch scale
Which is irrelevant to the discussion. 1em=100%, whether that starts out
as IE 'smallest' or 'largest' size. It's still 1em or 100%.
But simply breaking the default switch
There is nothing broken here, except your understanding of what 1em/100% is.

--
Berg
Dec 5 '06 #17
VK
A font size of 1.5em should be equal to 150%

Really? Says who?

Simple logic. Obviously 2em should be twice as big as 1em and 200% is
twice as big as 100%.
The simplicity of this logic is indeed killing :-) It has one "small"
default though by having nothing common with the existing specs.

The hint #1: 200% of say one pound is not the same as 200% of one
ounce.

The hint #2: the initial value where %% are applied to in IE depends on
the current mode (BackCompat vs CSS1Compat). While in the quirk mode
it's counted from Medium, in the "standard compliant" one it's counted
from Smaller. This way putting IE in that mode *and* killing the
default switch behavior by body{font-size:100%} is a usability crime to
be beat down for.

The hint #3 (64K value): before giving browser-specific advises it is
always a good idea to read the relevant producer's documentation:
rather than building the picture solely out of your own mind.
http://www.xs4all.nl/~sbpoley/webmatters/verdana.html
So basically the author says that 1em of one font may be noticeably
unequal to 1em of another font and that's terrible wherever found.
That's a killing argument (with a shiny absence of any screen
typography knowledge demonstrated throughout the article). It is indeed
difficult to argue with such straight and simple logic - so I better
will not.

Dec 6 '06 #18
VK schrieb:
The hint #1: 200% of say one pound is not the same as 200% of one
ounce.

The hint #2: the initial value where %% are applied to in IE depends on
the current mode (BackCompat vs CSS1Compat). While in the quirk mode
it's counted from Medium, in the "standard compliant" one it's counted
from Smaller.
So you say that the basis for the calculation of the font size defined
in em or % are different where they should be equal (the parent
element's font size)?

I would call this a bug.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Dec 6 '06 #19
VK
Johannes Koch wrote:
So you say that the basis for the calculation of the font size defined
in em or % are different where they should be equal (the parent
element's font size)?
em and % are *relative* inits. It means that no matter what: there must
be at least one *absolute* unit somewhere (implicit or explicit) from
which all other calculations are made.
With body{font-size:100%} where do you propose to look for to calculate
100% of? html element? * html? :-)
I would call this a bug.
A bug is a behavior going against the provided specification. A
producer-documented behavior is a feature: standard or non-standard is
another question. Though reading through W3C I see no requirements to
call this behavior non-standard.
<http://msdn.microsoft. com/workshop/author/dhtml/reference/properties/fontsize.asp>

Dec 6 '06 #20

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

Similar topics

1
4185
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS structure. I seem to be doing this correctly, but when I try to create a System.Drawing.Font object with the Font.FromLogFont, the new Font object has a different Name than the LOGFONT.
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;).
3
7217
by: Barry Anderberg | last post by:
I'm using the .NET Memory Profiler by Sci Tech and I wrote a little test application to verify something odd I observed and it appears that System.Drawing.Font fails to dispose of its FontFamily. I run the following code: // BEGIN while( true ) { System.Drawing.Graphics dc=lblClock.CreateGraphics();
3
26567
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object cannot be written to the XML config file. Next time the program is started the font is read from the config file. But how to convert the string to a Font object? -- Wim
3
3672
by: pnp | last post by:
I have created a coposite user control of a text box and a label. I have exposed the font of the textbox property through a property of the control but every time I try to change that through the property grid of the designer when I use the composite control in a form, after a rebuild the changes seem to get lost! I don't see the Font property anywhere in the inner code... What am I doing wrong?
4
1942
by: BobAchgill | last post by:
Is it possible to use a font that is not stored in the windows font directory? I would like to use a font that is stored in my application directory... But this does not seem to work... rtbMyRichTextBox.SelectionFont = New Font(CurDir() + "\" + "MyFont.ttf", 12, FontStyle.Bold) Thanks!
6
8098
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a Private Font Collection” .... I only see a default font written to the form NOT the private font that was loaded. Ofcourse I see the right font written if the font is already one that is installed in the system. But if the private font that I...
1
2725
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);
24
2837
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show the fonts i want. If i cahnge the printer to the printer that
16
1879
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
0
8788
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
9476
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
9335
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
9263
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,...
1
6751
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
6053
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
4570
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
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
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.