473,791 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Font Size Initialization

Hello,

I have been reading a few articles about font sizing and I get various
versions.
All them say to use em ... ok that is what I use. But then they differ
on the text size "initialization ".

A reset version:
html, body {font-size: 1em;}

Another one:
body {font-size: 100%}

Another one:
body { font-size: 62.5%; }

And yet another one:
html { font-size: 100%; }
body { font-size: 50%; }

Which one should I use? Why is there so many approaches?

Thanks,
Miguel
Jun 27 '08 #1
4 2763
On 05/10/08 09:55 am, shapper wrote:
All them say to use em ... ok that is what I use. But then they differ
on the text size "initialization ".

A recent version:
html, body {font-size: 1em;}

Another one:
body {font-size: 100%}
100% has been preferred because of some odd problem IE6 has with font
sizing using ems. That is becoming less of an issue as IE6 is phased out.
Another one:
body { font-size: 62.5%; }
Ridiculously small. Only if you do not want anyone to read the content.
Or only those with excellent eyesight 1 foot (30 cm) from the monitor.
And yet another one:
html { font-size: 100%; }
body { font-size: 50%; }
50% is absurdly small. Unless the visitor has a 24" (61 cm) monitor at
800x600 resolution.
Which one should I use? Why is there so many approaches?
100% or 1em should be the basic content font size. It is presumed the
visitor has a clue about their browser options and knows how to set the
default font size to suit their needs and taste.
Ems are a "fixed" method of setting the font size. Regardless of the
current context, 1.5em results in a 1.5em font size.
Percentage allows a scaling of the size based on the current context.
If, say, a div is set for font-size:1.5em and a <phas a style of
font-size:85%, the displayed font-size is 1.5 * 0.85 = 1.275 em. For a
context where the font size is 0.8 em, the the same <pshows 0.68 em.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 27 '08 #2
shapper wrote:
Hello,

I have been reading a few articles about font sizing and I get various
versions.
All them say to use em ... ok that is what I use. But then they differ
on the text size "initialization ".

A reset version:
html, body {font-size: 1em;}

Another one:
body {font-size: 100%}

Another one:
body { font-size: 62.5%; }

And yet another one:
html { font-size: 100%; }
body { font-size: 50%; }
Gee, why don't they just have font-size: 10% so that EVERYONE can read
the Web with a magnifying glass.
>
Which one should I use? Why is there so many approaches?
The relevant precept is that the user knows best what his preferred main
text size is. Therefore, if you use anything other than 100%, the
implication is that you know better than your user what works best for
the user.

User - "This is the main text size that works best for me."

Site designer or owner - "NO! I want you to read it at THIS size. Submit
to my will!"
Jun 27 '08 #3
Harlan Messinger wrote:
The relevant precept is that the user knows best what his preferred
main
text size is. Therefore, if you use anything other than 100%, the
implication is that you know better than your user what works best for
the user.

User - "This is the main text size that works best for me."

Site designer or owner - "NO! I want you to read it at THIS size. Submit
to my will!"
I agree with you, in principle. The problem is that, historically, many
designers who set font sizes based on the user's default have tended to
set sizes a little smaller than the default. And so users have
historically set their defaults one step higher to ensure they get the
size they truly want. And so a designer who blindly uses the user's
default will, paradoxically, end up using a larger size than what the
user would really prefer.

Jun 27 '08 #4
C A Upsdell wrote:
Harlan Messinger wrote:
The relevant precept is that the user knows best what his preferred main
text size is. Therefore, if you use anything other than 100%, the
implication is that you know better than your user what works best for
the user.

User - "This is the main text size that works best for me."

Site designer or owner - "NO! I want you to read it at THIS size.
Submit to my will!"

I agree with you, in principle. The problem is that, historically, many
designers who set font sizes based on the user's default have tended to
set sizes a little smaller than the default. And so users have
historically set their defaults one step higher to ensure they get the
size they truly want. And so a designer who blindly uses the user's
default will, paradoxically, end up using a larger size than what the
user would really prefer.
Since not ALL web designers are doing this, it follows that the user who
is sensitive to this is going to be ratcheting his size up and down all
day anyway. Given that fact, there isn't any reason to be one of the
designers who are doing it wrong rather than one of the designers who
are doing it right, no?
Jun 27 '08 #5

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

Similar topics

115
7244
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:
9
3780
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>
0
2621
by: Martin Streller | last post by:
Hello, The code below represents a simple ownerdrawn, Listview class in C#. Its purpose is to avoid the flicker of the MS ListView. So I can't fall back to their one. Does anybody know why I cannot change the size of the ListView's font (ListView.Font) from e.g.
4
3497
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;
7
2975
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and already formatted as "Shopping" ---Bold "for" -----Regular Now I want to underline whole text by preserving old style i.e. Bold and
7
3055
by: Daniel Kaplan | last post by:
I have the item below at the top of my style sheet. And it seems that the font-szie is ignored. I know that my linked style sheet is being read, and used because if I remove the font-family line, the font changes. But it appears that no matter what I do with the font-size, it is ignored, and I cannot figure out why! Any clues? At the very bottom is the entire style sheet, just incase anyone comes accross something that they feel is...
16
2459
by: maya | last post by:
I have heard so much preaching here about how font sizes should be set as percentages so users can change font-sizes on their browsers... ok, so now at work am working on a site where we need to do precisely that b/c it's for an audience that some users maybe be visually-impaired.. but I can't get it to work right, problem is that font sizes are not consistent across diff elements.. code: body {text-align:center; /* to center...
18
25007
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin, that IE7 does not seem to offer any way to control the font size of a text input element.
2
3631
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts" are supposed to be in the font: Georgia, but they are showing up in "Times New Roman"...blah! I can't find anything wrong in the code, but who am I trying to fool? I know nothing about this stuff. The code is below. The parts that I *think*...
0
9669
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
10426
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
10207
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
10154
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
6776
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
5430
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
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
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.