On Wed, Apr 9, 2014 at 11:33 AM, Tim Climis <tim.cli...@gmail.com> wrote:
>>> How did you calculate 100% = 1em ?
>>> Mostly everyone used, including myself pixels for box sizing, I hope you
> were referring to creating a DIV as in box sizing ? What do you mean by
> "percentages are based on browser size" ?
>>>
>>>> (although, it would be kind of fun if 100% resulted in letters
>>>> hundreds of pixels high...)
>>>>
>>>> ---Tim
>>>
>
>> I think percentages are based on their parents size and not the browser.
>> Correct me if I am wrong.
>
> You are correct (except for the exceptions mentioned later by other people),
> and of course for fonts.
>
> The original question was about fonts.  None of the box-model percent sizing
> tangents matter.  My comment was based on this from the OP:
>
>> percentages from what I know are relative to the browser size
>
> And that's only remotely true in the context of boxes.
>
> For example, if I have a rule that says
> body {
>         font-size: 50%;
>         width: 50%;
> }

I'll add that ems and % for font sizes will compound.

<ul>
     <li class="a">Hi
          <ul><li class="b">There</li></ul>
     </li>
</ul>

A rule of li{font-size: 50%;} for the above will cause "Hi" to be 1/2
the size of it's parent (or browser default) and "There" will be 1/2
the size of "Hi".




-- 

Tom Livingston | Senior Front-End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to