[Phpwm] em steps

Paul Matthews paul.matthews.86 at gmail.com
Sun Feb 11 18:24:55 GMT 2007


On 2/11/07, David Goodwin <david at codepoets.co.uk> wrote:
>
> Phil Beynon wrote:
> > Anyone got an idea on this...... I was just trying to get a bit of fixed
> > text just the right size in a gap.....
> >
>
> I don't know much about CSS, but does this help ? :
>
> http://riddle.pl/emcalc/
>
> David.
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>


Sorry, I think you've got the wrong end of the stick. What I mean is if the
difference between the sizes you changed in 'em's is less than 1 pixel then
the browser can't show it (for obvious reasons).
So taking the following example:
----------------------------
/* === old === */
p {
    font-size: 1em;
}

/* === new === */
p {
    font-size: 0.99em;
}
----------------------------
If the size of the old style size translated into pixels was 12px (for
example), then if the new style's  translated size were 11.75px, it can't
show points of a pixel as your monitor can't do it.

Hope that makes more sense. I don't mean you yourself should change the
sizes using a calculator, what I mean is the browser needs to work out how
many pixels a font is when it displays it. You yourself work with the 'em's
because they're relative.

>From Paul M.


More information about the Phpwm mailing list