473,785 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clarification on Font Size and Inheritance.

Hello all,

I just need confirmation on the subject of font size and its
inheritance. Take this example:

body {
font-family: arial;
font-size: 95%;
}

p.fineprint {
font-size: 75%;
}

Is the font size in the p.fineprint set to 75% of the *value in the
body*? So in this case, it would be 75% of the 95% in the body. My
experiments seem to show that that's the case, but I just need some
confirmation.

Also, how do EM and % compare? Setting the font to 1em seems to be the
same as setting it to 100%, .90em seems the same as 90%. What are the
technical differences? In which cases should/would I use one over the
other?

Thanks everyone.

Viken K.

Jan 11 '06
36 3364
> In Firefox, Tools > Options > General > Fonts & Colors
Adjust your own taste a bit lower than what it is now.

Not sure how we can make this any more clear...


It's not a matter of making it more clear. I'm merely trying to figure
out and understand the technical and background aspects of it all.

The <p> tag inherits the font-size from the <body>. I was just trying
to understand where the <body> inherits the font size from if I use a
percentage value. It's clear to me now that it gets it from the browser
settings.

Anyone can just copy and paste code and make a website work. If I
understand *how* it all works, I can be better at it. Of course, one
can't learn everything in a day :>)

Viken K.

Jan 11 '06 #21
Viken Karaguesian wrote:
In Firefox, Tools > Options > General > Fonts & Colors
Adjust your own taste a bit lower than what it is now.

Not sure how we can make this any more clear...
It's not a matter of making it more clear. I'm merely trying to
figure out and understand the technical and background aspects of it
all.


Ok. <g>
The <p> tag inherits the font-size from the <body>. I was just trying
to understand where the <body> inherits the font size from if I use a
percentage value. It's clear to me now that it gets it from the
browser settings.
Yes, that is how it works, so long as the body sizing is using
percentage. It will also work if you use a value of em, but Internet
Explorer has a bug whereby using em causes problems. A small increase of
yours may end up displaying double the size.
Anyone can just copy and paste code and make a website work.
For some value of "work" <g>
If I understand *how* it all works, I can be better at it. Of course,
one can't learn everything in a day :>)


Allow at least .. three? .. days.

--
-bts
-Warning: I brake for lawn deer
Jan 11 '06 #22
"Alan J. Flavell" <fl*****@ph.gla .ac.uk> writes:
Viken Karaguesian <vi****@aol.com > wrote:
If I set the body to 100% but really want my font-size to be 95%,

Neither you nor any client (let alone users) ever wants *that*. What's
certainly demanded on a reguarly basis is what I'd call 'professional
PR (pixel ratio ;) marketese'.

There's the widespread half-witted 'accessibility' directive 'use
relative units for font-size instead of absolute ones' (without further
notion, 'relative' includes the 'px' unit of course :), though.

Which usually boils down to scaling some notorious sans-serif of sorts
downwards to a percentage that equals the pretty sight of 12px in a
house and garden 96 dpi environment. And sticking a 'strong
accessibility commitment' on top of it.

This level of insight and commitment is excellently illustrated by the
fine guidelines of the Dutch government for "A durable and accessible
web for everybody". Have a screenshot:
<http://bednarz.nl/img/duur.png>
I do not *need* it like *that* myself, BTW, but on my Laptop any size
that is at least legible is good enough to mess things up (and my
eyesight is perfectly alright for spotting pixels at an arm's length ;).

Now for the good news; as a natural person you need not be a hypocrite
and can just choose an absolute (in reality, not per spec) size to your
likes (if that's what your site is all about) with the px unit.
Or be a good boy and decide not to fuck with your visitors.
It's the modern example of "Optimized for arguing with customers",
don't you know? [...] But there are web site authors who still don't want to know.


This is unfairly overgeneralisin g as professional web authors are
regularly doing just that, not arguing with *their* customer, when
generating flyshit on demand.

Jan 11 '06 #23

On Wed, 11 Jan 2006, Eric B. Bednarz wrote:
"Alan J. Flavell" <fl*****@ph.gla .ac.uk> writes:
It's the modern example of "Optimized for arguing with customers",
don't you know?

[...]
But there are web site authors who still don't want to know.


This is unfairly overgeneralisin g as professional web authors are
regularly doing just that, not arguing with *their* customer, when
generating flyshit on demand.


I understand that, but it doesn't wash - the *site* has still been
optimized for arguing with *customers*, no matter what the
subcontracting details behind how the *site* came into being.

If I engaged an architect to build me a house, and I demanded
something that was in clear violation of building codes, I would
expect the architect to advise me of my mistake - not to simply do
what I'd innocently asked for, and leave me to pick up the costs of
the mistake. I don't see why we shouldn't apply the same standards to
web designers.
Jan 11 '06 #24
"Alan J. Flavell" <fl*****@physic s.gla.ac.uk> writes:
If I engaged an architect to build me a house, and I demanded
something that was in clear violation of building codes, I would
expect the architect to advise me of my mistake - not to simply do
what I'd innocently asked for,
That should go without saying. But you cannot do any *more* than that
-- convincing advice at gunpoint is still illegal in some countries I'm
afraid -- short of turning down the assignment. Which isn't really an
option for everybody's situation, and it might even require some
legalese in advance that wouldn't read as a convincing advertisement to
hire you in the first place.

On the upside, talking sense is seldom a problem if there is an even
communication channel available, id est, one person advising one other
who is entitled and willing to make a decision all by herself.
Quite often, that's not the case.
and leave me to pick up the costs of
the mistake. I don't see why we shouldn't apply the same standards to
web designers.


If all the houses in your neighbourhood sport the same clear violations,
you are certainly entitled to your own copy. This isn't meant to be
funny, by the way. E.g., the odds really *are* that 'people' will find
their accidental default text size too large if you don't do anything
about it. Because quite literally all the 'normal interest' sites they
visit *have* done that for them, and there _is_ a real problem when real
people (customers, staff members, business relations) start complaining
about that -- and they actually do; expect the advising formerly expert
to be greeted with 'see, I told you so right from the beginning' by the
late client.

There's no conclusion on my account, btw, except that 'doing the
right thing' will not always just fly, neither as a line of
argumentation nor in terms of, eeks, user experience.
Jan 11 '06 #25
"Beauregard T. Shagnasty" <a.*********@ex ample.invalid> wrote in
<news:1o******* *************** ********@40tude .net> :
Viken Karaguesian wrote:
X% of what each and every visitor (including yourself) has
chosen as their personal, preferred size.


OK...I see. If I use the percent value in the <body> tag,
then the base font size is derived from the user's browser
settings.


Exactly.


How many visitors to the average site actually know how to change
the font size in the browser? Probably not as many as we would
like, or the op's situation wouldn't have happened. The site's
owner would have already had his font size reduced.

Perhaps that should be added to the installation routines:
Pick a font size you like and this will be the default, you can
change the appearance of web pages [here]. Have a nice day.

Just a thought.

--
Rob McAninch
http://rock13.com
Jan 11 '06 #26
On Wed, 11 Jan 2006, Rob McAninch wrote:
How many visitors to the average site actually know how to change
the font size in the browser?


Maybe those visitors prefer the size which was selected for them by
their vendor? We really don't know - and, as authors, we shouldn't be
expected to ask. Their choice is their choice - no matter how it was
arrived at. Our job as authors is to work *with* that choice, not to
argue with it, unless we can find some good excuse for interfering.

Authors who say "the font looks too big *to me*" isn't what I'd call
an adequate excuse to interfere with the reader's right to choose.

As a reader, of course, I set a minimum font size in my browser, to
protect me from those idiot authors who persist in trying to reduce
the font size way below what I chose for myself. (I'm glad to see
that Chris Pederick has now implemented the suggestion for an option
to disable that setting when one is *reviewing* web pages, rather than
trying to *use* them - web developer toolbar version 1.0.)
Jan 11 '06 #27
Viken Karaguesian wrote:
The current site I'm working on uses Arial font, as requested by my
"client" (I'm volunteering my time, 'cause this is fun for me). I set
the font to 100%, but they complained that it looked too big (tall).
They showed me examples of other sites that used Arial font, and said
"make it look like that". Reducing the font to 95% gave it the look
they wanted.
Show your client the marvels of his browser. Specifically how to adjust
the default font size.
Also, what is the client using? A 21" monitor at 800x600?
Actually, I think that Arial is easier to read at 95% than at 100%. The
letters don't look so tall and bunched together.

That only applies to your particular monitor, screen resolution, color
depth, default font size, quality of font package(s) installed, font
rendering subsystem, font smoothing, and personal taste. If you can adjust
all of those properties at the visitor's machine, you are a wizard. But
the visitor may not appreciate it.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 11 '06 #28
Alan J. Flavell <fl*****@ph.gla .ac.uk> wrote:
As a reader, of course, I set a minimum font size in my browser, to
protect me from those idiot authors who persist in trying to reduce
the font size way below what I chose for myself.


FWIW, in addition to setting a minimum font size, I also use my user style
sheet to apply "font-size: 100% !important" to the HTML and BODY elements.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"Shin: a device for finding furniture in the dark." - Steven Wright
Jan 11 '06 #29
Deciding to do something for the good of humanity, Rob McAninch
<ro****@excite. com> spouted in
comp.infosystem s.www.authoring.stylesheets:
Perhaps that should be added to the installation routines:


That assumes that the browser is actually installed by the user, not by
e.g. the company technician or a friend who "knows computers".

It also ignores that commonly-used browser-like OS component that is
installed as part of Windows, not installed separately.

So perhaps it's a nice theory, but it would never work (and yes, I
realise your comment was at least partly tongue in cheek). :-)

--
Mark Parnell
=============== =============== =============== ========
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/
Jan 11 '06 #30

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

Similar topics

10
4652
by: Luke Duddridge | last post by:
Hello, I work for a local council and have recently been part of the project for a new website design which went live at the end of september at www.tauntondeane.gov.uk. I set the relative sizes on the CSS so that the page would be best sized with Microsoft IE set to view:text size:Medium(which I assume is the default value) as not many people know that the size of the browser text can be changed.
2
1945
by: Haines Brown | last post by:
I don't understand the inheritance logic in this situation. Let me describe a simple situation: I have a document with a style sheet that specifies: address, blockquote, caption, center, dd, dir, div, dl, dt, form, hr, menu, ol, p, td, th, ul { font-size: 100%; } body { font: 100% serif, "Times New Roman","Times Roman";
7
19488
by: Fabian Neumann | last post by:
Hi! I got a problem with font-family inheritance. Let's say I have CSS definitions like: p { font:normal 10pt Verdana; } strong { font:normal 14pt inherit;
4
3207
by: Cezar | last post by:
Hi there. On this page: http://www.helpdeskics.com/ in the blue menu and footer font size in Opera is less than in other browsers. Why ? I don't know how can I set correct font size for Opera. -- Regards, Cezar.
15
2460
by: srampally | last post by:
The following code works in firefox. But IE displays the hyperlink at font-size=13 rather than font-size=10. Why? If its a known IE bug, how should I fix it? I always want the hyperlinks to take the size of the next parent element's class. thanks for the help, Shashi
30
4544
by: Takehiko Abe | last post by:
I have a <pelement with <ttinside: ;;; <p>A paragraph contains <tt>tt element</tt>.</p> I would like to set the font-size of the TT to the same as the containing <p>. This does not seem to work: ;;; p {
18
25006
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.
14
2829
by: Roedy Green | last post by:
Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
0
9645
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
10341
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
9954
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
8979
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
7502
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
6741
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
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3
2881
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.