EM can fail miserably in below senario for IEs for p, li and span tags due to 
inheritance making them very tiny and unable to get consistence font size for 
one block of content in different browsers not just the IE.

body {font-size: 100.1%}
p, li {font-size: 0.95em}
span  {font-size: 0.9em}

<p><span><span>xxx<span><span></p>

<div><span><span><span>xxx</span><span><span></div>

<ul>
        <li><span>some text
                some more texts depend on  situation <span>
                <span>extra more texts depend on above situation 
</span><span><span><li>
        <li> <div> <span>xxx</span></div></li>
        <li> 
                <ul><li><div> <p>some text 
                <span>some more texts 
                        <span>extra more texts depend on above situation </span>
                </span>
                <p></div></li><ul>
        </li>
</ul>

You might question what kind of developer would code such markups, if you have 
this question, chances are, you have not done layout for sites that how content 
being pulled largely depend on how users user the website.

I used to use EM only for font size, something I learned from this list. It was 
time when you are new, you have no your opinion and know nothing about 
exception that some fine ivory tower idea cannot withstand real world practise 
but followed others , The first time I saw 
"<span><span><span>xxx</span><span><span>" from a project I did for a social 
networking site, I changed them, and used EM for font size, the programmer 
changed my hard work back and I was very resentful my web-standards compliant 
work got chopped off so brutally with no explanation ever given.

It took me a few years to understand why the programmer did what he did.

adding these do not solved the problem
span span {font-size: 1.2em}
span span span {font-size:1.3em}
li li span  {font-size:1.2em}


tee

On Jul 20, 2010, at 8:27 AM, <michael.brocking...@bt.com> 
<michael.brocking...@bt.com> wrote:

> The basic plan that I follow is to use % for structural items, which 
> generally need to be proportional to other structural items, and ultimately 
> the viewport itself.
> Then, pixels purely for borders and images,
> And EMs only for text.
> 
> Margins and padding can be either pixels, EMs or % depending on the 
> particular situation, ie whether you are using them as structural pieces, for 
> text-indent, or for decoration.
> 
> 
> My argument for this is that if a box has width:50% or 98% or something like 
> that, it is immediately obvious when reading the CSS how big it should end 
> up; not nearly so obvious with width:43em
> At the other end of the scale, if you want a fine line, then what you really 
> want is 1px, or 2px for medium etc, not 0.05em or 0.004%, particularly since 
> the latter are more likely to be subject to rounding errors.
> 
> With text itself, it should then be obvious that EMs are the most appropriate 
> - % may work in a very similar way, but there is plenty of scope for 
> confusion with percentages used for structural elements.
> 
> 
> 



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to