why can't you scale text by percentage of the container it is in?

Discussion in 'Web Design' started by upside, Jul 11, 2012.

to remove all ads.
  1. upside

    upside New Member

    Messages:
    30
    i've tried to get my head around this one.
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,662
    Scale it from what dimension??
     
  3. Phreaddee

    Phreaddee Super Moderator Staff Member

    Messages:
    1,978
  4. upside

    upside New Member

    Messages:
    30
    x-height

    (as in height of the lowercase x)
     
  5. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,662
    Font size is an inheritable property so the relative size of the font in any element is determined by the cascade from the elements first ancestor where a fixed size was specified.
    Relative dimensions such as em,ex are determined from the cascade so 1ex is the height of an uppercase 'X' in the font face, family and the inherited size of any given element.

    If no fixed font size exists in the cascade the font size that applies to the body element is used to calculate the relative dimensions.
     
    Last edited: Jul 11, 2012

Share This Page