Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > vetical aignment of the text.

Reply
Thread Tools

vetical aignment of the text.

 
 
Roy A.
Guest
Posts: n/a
 
      09-24-2008
On 23 Sep, 22:03, richard <(E-Mail Removed)> wrote:
> On Mon, 22 Sep 2008 21:38:02 +0000, "Chris F.A. Johnson"
>
> <(E-Mail Removed)> wrote:
> >On 2008-09-22, richard wrote:
> >> On Mon, 22 Sep 2008 21:06:52 +0300, "Jukka K. Korpela"
> >><(E-Mail Removed)> wrote:

>
> >>>Mr. X. wrote:

>
> >>>> In CSS, while using the property line-height:46px;

>
> >>>You shouldn't use the px unit for anything related to font size, except
> >>>possibly in a user style sheet.

>
> >> Horsehockey!
> >> A "pt" in the printing industry has a defined size.

>
> > The web has nothing to do with the printing industry; a web page is
> > not a piece of paper; "pt" does not apply.

>
> Actually it is "paper". A type of paper that can be recycled on
> demand.
> A "font" size is measured in points. Not pixels.
> Then why are we given the choice to use "points"?


Print. On screens, points is depended on OS settings (and user
settings on some OS).

> >> A "px" in the electronics of computers has a defined size.

>
> > No, it doesn't. And if it did, it would be the wrong unit to use.
> > You may be able to read text at 12px, many others cannot.

>
> Oh? Then what does 800x600 resolution refer to? Point size?


Screen pixels.

> >> An "em" is defined by the person who wrote the browser and could mean
> >> just about anything. Is an "em" based on the capital M or the little
> >> m?

>
> > Neither. See <http://www.w3.org/TR/CSS21/syndata.html#em-width>:

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

>
> Pure gibberish. It's a roundabout way of saying, "We really don't know
> either".
> If I use, font-size:1.5em; how is this value computed?
> I have been assuming that it is based on the user's choice if not
> defined elsewhere.
> So if the user has selected a 10pt font, oh my, he can't do that
> because a "point" is irrelevant on a screen because a screen is not
> paper, and I say display 1.5 em, then in effect, I have told the user
> to see 15pt.


Which relates to the users OS settings.

> But if I say display 15px, then it does not matter what font point the
> user has chosen, he will see the same thing I see.


The user might not be able to read it.

> Now tell me kind sir, when you select a font to use on your browser,
> how does the browser define how the text will be displayed? In points
> or pixels or....? It has to define it somehow.
>
> >> Of the 500 plus fonts available, which font was used to base it
> >> on?

>
> >> What if I don't have that font?
> >> A "%" is even worse. What exactly is 100%?

>
> > 100% of the current size.

>
> Ah hah! And what is that size based upon? Points.


A default size chosen by browser or user. Witch relates to the font in
use.
>
>
> >> Inches and millimeters should be recognized by any browser precisely
> >> as they are. But who knows?

>
> >> If you're going to give a line-height property in pixels, then define
> >> your font size in pixels as well. Do not use both ems and pixels.
> >> This will help make sure the two work together if the user changes
> >> font sizes.

>
> > Why do you want to make the use change font sizes? Only incompetent
> > web coders do that.

>
> Dude, I constantly have to change text size on most sites.
> I have my browser font size set to like 14pt because I know many sites
> just love small print. Even then, I find some that are way to small.


Authors can override default settings. Use an 'user style sheet'
instead. Then you can specify what is default (fallback) styles, and
what is so "!important" to you, that the author can't override it.
 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      09-24-2008
On 2008-09-23, richard wrote:
> On Mon, 22 Sep 2008 21:38:02 +0000, "Chris F.A. Johnson"
><(E-Mail Removed)> wrote:
>
>>On 2008-09-22, richard wrote:
>>> On Mon, 22 Sep 2008 21:06:52 +0300, "Jukka K. Korpela"
>>><(E-Mail Removed)> wrote:
>>>
>>>>Mr. X. wrote:
>>>>
>>>>> In CSS, while using the property line-height:46px;
>>>>
>>>>You shouldn't use the px unit for anything related to font size, except
>>>>possibly in a user style sheet.
>>>
>>> Horsehockey!
>>> A "pt" in the printing industry has a defined size.

>>
>> The web has nothing to do with the printing industry; a web page is
>> not a piece of paper; "pt" does not apply.

>
> Actually it is "paper". A type of paper that can be recycled on
> demand.


Paper has a fixed size. You have no idea what size or resolution a
viewer's browser window will be.

> A "font" size is measured in points. Not pixels.
> Then why are we given the choice to use "points"?


For printing to paper.

>>> A "px" in the electronics of computers has a defined size.

>>
>> No, it doesn't. And if it did, it would be the wrong unit to use.
>> You may be able to read text at 12px, many others cannot.

>
> Oh? Then what does 800x600 resolution refer to? Point size?


The number of pixels on the screen. Which says nothing about the
physical size of the screen or about the size of the browser
window.

>>> An "em" is defined by the person who wrote the browser and could mean
>>> just about anything. Is an "em" based on the capital M or the little
>>> m?

>>
>> Neither. See <http://www.w3.org/TR/CSS21/syndata.html#em-width>:
>>
>> 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.

>
> Pure gibberish. It's a roundabout way of saying, "We really don't know
> either".


Correction: *You* don't know. Others have no problem with it.

> If I use, font-size:1.5em; how is this value computed?


It is "the font size of the parent element". See above definition.

> I have been assuming that it is based on the user's choice if not
> defined elsewhere.


Why assume when the facts are readily available?

> So if the user has selected a 10pt font, oh my, he can't do that
> because a "point" is irrelevant on a screen because a screen is not
> paper, and I say display 1.5 em, then in effect, I have told the user
> to see 15pt.
>
> But if I say display 15px, then it does not matter what font point the
> user has chosen, he will see the same thing I see.


You don't know what he will see. For some people, on some
displays, 15px will be easily readable. For others, it will be to
small or too large.

> Now tell me kind sir, when you select a font to use on your browser,
> how does the browser define how the text will be displayed? In points
> or pixels or....? It has to define it somehow.


In my browser, FF3, I select it in pixels. In a stylesheet, that
is what 100% or 1em refers to.

>>> Of the 500 plus fonts available, which font was used to base it
>>> on?

>>
>>> What if I don't have that font?
>>> A "%" is even worse. What exactly is 100%?

>>
>> 100% of the current size.

>
> Ah hah! And what is that size based upon? Points.


NO!!!

It is based on whatever the browser bases it on. That is usually
pixels.

>>> Inches and millimeters should be recognized by any browser precisely
>>> as they are. But who knows?
>>>
>>> If you're going to give a line-height property in pixels, then define
>>> your font size in pixels as well. Do not use both ems and pixels.
>>> This will help make sure the two work together if the user changes
>>> font sizes.

>>
>> Why do you want to make the use change font sizes? Only incompetent
>> web coders do that.

>
> Dude, I constantly have to change text size on most sites.


That's because there are so many badly coded sites. I don't have
to change size, because I set a minimum font size in my browser.

> I have my browser font size set to like 14pt because I know many sites
> just love small print. Even then, I find some that are way to small.


That's why you shouldn't define the main font size.

My browser is set for a minimum font size of 18px. Anything
smaller is unreadable.

>>> With that in mind, perhaps em's would be better for common text usage
>>> as both font size and line height will change accordingly.
>>>
>>> font-size:1.25em; line-height:1.5em;

>>
>> Don't use units with line-height:
>>
>>font-size:1.25em; line-height:1.5;

>
> well whaddaya know, an almost agreement.
>
>>
>>> NOT
>>> font-size:1.25em; line-height:50px;



--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments