From: Jukka K. Korpela on
C A Upsdell wrote:

> I was more interested in fixing the problem than in determining
> exactly why the switch to ex units worked, but my suspicion is this: In
> the CSS used to implement the dropdown menu, a mixture of em and
> ex units was used,

Stop right there. There you have the problem, fix it. Don't assume that em
and ex units have some specific relationship to each other. They don't. We
know that some browsers use ex = 0.5em whereas some browsers correctly treat
ex as the x-height. This can make a considerable difference.

This is far more important than some assumed bugs in rounding.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

From: Jukka K. Korpela on
shapper wrote:

> I am styling my paragraphs as follows:
>
> p {
> color: #222020;
> font: normal 1.0em/1.5 Arial, 'Helvetica Neue', Helvetica, sans-
> serif;
> margin-bottom: 8px;
> text-indent: 1em;
> }

That's much better than most paragraph styling I've seen, but
a) you're setting color without setting background
b) you're using first-line indent _and_ vertical spacing between paragraphs,
which is somewhat half-baked - if you prefer literary styling of paragraphs,
just use it, instead of additionally using half-technical paragraph styling
c) the line-height of 1.5 is perhaps a bit exaggerated, though this depends
on the text content as well as expected line length.

> For text size I always use "em" but for margin and padding should I
> use em when it relates to text and px otherwise?

Right. If you consider what happens when the font size is, for example, 80
pixels, you'll see why it is better that the margins (and padding) change
according to font size, instead of staying at fixed pixel values.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

From: dorayme on
In article <7k260vF37ttolU1(a)mid.individual.net>,
John Hosking <john-nin2(a)bluemail.ch> wrote:

> This is the same reasoning (or "reasoning") that convinces people

I would not mention this, honestly, cross my heart, if I did not know
you took a particular interest in apostrophes and quotes and stuff but
the clagnut reasoning is not so bad (I agree it is bad), that it is not
a process of reasoning. In mathematical reasoning, for example, errors
often creep in, but the process is still properly to be called reasoning.

Gosh, have I woke up in in some strange pedantic mood? I'll finish my
first cup of tea of the day and see... <g>

--
dorayme
From: dorayme on
In article <hbgrdb$ksa$1(a)news.eternal-september.org>,
C A Upsdell <cupsdell(a)nospam.not> wrote:

> dorayme wrote:
> >> There is a view that ex units should be used instead of em units. I
> >> have recently found that using ex instead of em fixed some cross-browser
> >> issues. See:
> >>
> >> http://kb.mozillazine.org/Em_units_versus_ex_units
> >
> > It is all precious nonsense. It does not matter about small variations
> > and if it concerns anyone, they are obsessing about the wrong things.
>
> What I was "obsessing about", which I solved by switching a particular
> dimension from em to ex units, was a problem with a CSS-based dropdown
> menu: with Opera, when the user pointed to a menu item, then moved the
> cursor down to the associated dropdown menu, the dropdown menu sometimes
> disappeared. IMO such a problem in a website is not unimportant.

I agree that in the area of dropdown menus, one sometimes needs all the
help one can get, they can be tricky beasts and it cannot hurt to keep
in mind your thought to use ex if one runs into cross browser problems.

But without a specific case, it is hard to know in advance. One of the
things you tend to run into in dropdown menus is wrap and height
problems and using the ex might simply be a more reliable way just for
these problems. I have no idea how it might affect or generate other
problems though?

--
dorayme
From: C A Upsdell on
Jukka K. Korpela wrote:
> C A Upsdell wrote:
>
>> I was more interested in fixing the problem than in determining
>> exactly why the switch to ex units worked, but my suspicion is this:
>> In the CSS used to implement the dropdown menu, a mixture of em and
>> ex units was used,
>
> Stop right there. There you have the problem, fix it. Don't assume that
> em and ex units have some specific relationship to each other. They
> don't. We know that some browsers use ex = 0.5em whereas some browsers
> correctly treat ex as the x-height. This can make a considerable
> difference.
>
> This is far more important than some assumed bugs in rounding.

I do not assume a bug in rounding. I *suspect* a difference in how
Opera handles ex and em units.