MEM wrote:
> Thanks for the IE8 info. I didn't know about that.

IE8 still supports IE-expressions in its two "backwards compatibility
modes" - emulating IE7 standard mode and IE5.5/6 quirks mode. No need to
hide them from IE8 in "super-standard mode" though, since it simply
ignores them then.
Most of what we can do with IE-expressions can be done in regular CSS
already - in supporting browsers, and new CSS functions like calc() will
improve things even more in the coming years.

> Please don't take me wrong: I was not putting the article in 
> question, neither trying to make you reiterate things that you have 
> written before.

Question all I write as much as you like, as I can't imagine any of it
being even remotely close to "perfect".
In a few years probably most of what I've written about such
problem-solving in old browsers will be obsolete and should be deleted
anyway, as browsers slowly catch up with common standards.

> I was just asking for a clarification and trying to understand how 
> things really happen on that .js code.

Ok, I'll try. See below.

> But it was a too long pseudo-English e-mail from someone who doesn't 
> even properly know the language, and I assume my fault for some 
> miscomprehension that may have arrived.

Language isn't a problem here, despite the fact that English isn't my
native language. I'm Norwegian... :-)

I did however have a problem with you not being able to see that I've
avoided negative margin-top by simply setting the top-margin to zero if
it ever could become negative.

Blame my short response on the fact that I, as goes for many who have
been around on various lists and forums for a few years, has grown a bit
tired of "continuous spoon feeding" when I think the case has been made
clear enough already.
Such impatience and "shortness" may hit the wrong people at times - sorry.

> Despite the fact that that code will be deprecated sometime, I still 
> want to learn how to "read it", but, as you stated, maybe I should 
> look elsewhere.

Most would read my IE-expression from a Javascript background, so a
person fluent in Javascript should be able to help you extract more details.

I have no real experience with Javascript, so I created the expression
based on simple logic that works in all programming languages. It was
just a question of getting the syntax right for the language at hand.
Microsoft's "dynamic expressions" are compact, but not very
straightforward to create or read IMO. Glad I won't have to write many,
if any, more of those.

-------

The original problem was that a negative margin-top would obviously hide
the top of the container above viewport area, and that would be no
improvement over basic absolute positioning that many use for such
horizontal and vertical centering.
If that was good enough, then no IE-expression would be needed.

Avoiding a negative margin-top is the only slightly clever part in my
expression - and why I coded it.

In practice I'm dividing dimensions of body (equal to viewport) and the
centered element by 2, and subtract half of one from half of the
other to get the offset needed to get the vertical mid-point of the
element positioned in the vertical mid-point of viewport, *if* (and
only if) the viewport is tall enough to house the entire container.
If the viewport is too small for the element, I zero out margin-top so
the element stays inside viewport.

--------

Hope that helps a bit.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [[email protected]]
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