I would normally write a somewhat shorter answer, and maybe give a
"quick fix" or two. However, there seems to be so many who think
'hasLayout' is a /simple solution to a problem/, that I see the need for
some clarification on the subject.

'hasLayout' *is* the problem with IE/win - not the other way around.
Sometimes we can use 'hasLayout' to solve problems, but it isn't a
reliable cure unless the proprietary concept itself is pretty well
understood. That's why the article[1] was written in the first place.
Microsoft later also wrote an article[2] on the subject.

That article[1] isn't a quick "read and forget" I'm afraid - even though
some present the 'hasLayout' concept as such. One will have to learn how
to avoid 'hasLayout' as well as to use 'hasLayout' in order to master
IE/win - or wait until a new rendering-engine has been created (maybe
for IE8).


Erik Visser wrote:
> http://www.bartbleijerveld.nl/

>> The link to article on 'Layout' was posted then, along with what's
>>  explained above.
>> 

> yes, i read that, but i don't know how to know which element needs 
> layout. An it has lots and lots of info. It gets me dazzling. How do 
> I know / examine which element to give layout?

That is indeed the time-consuming part. May take a while to get the hang
of it, but there are no short-cuts if you want to master such problems.
---

Now, before starting off looking for the right bug-killing method
there's one question that's important:

Q: Did the original template/layout suffer from the same problem in IE/win?

A 1:It didn't, so you should start all over again from that base, and
pay attention to what IE does for each addition you code in.

A 2: It did, so the template/layout is flawed and should not be used at
all. Time to look for another one or create one from scratch.

That is the most correct approach to the problem.
---

I believe the original template/layout /did/ work as intended in IE/win,
so making sure there's only the original source-code/CSS to begin with
will probably get you back on track.

May take you a while to build your own solution on top of it without
introducing weak spots again, but I can't see how a "quick fix" from me
would solve the underlying problem. Somehow your layout is weakened, and
the weak points should be found, understood, and fixed - in that order.
---
If you want a quick way out, then using a simple debugging-test like the
following may help you along...

* html body * div {height: 0;}
* html body * * div {height: auto;}

You just keep adding universal selectors (*) to both those rules until
you have a somewhat stable and working layout. Then you start narrowing
it down by counting nested elements = 'number of universal selectors' in
the first rule and try applying the 'height: 0;' only to that one,
single, element. The second rule should be discarded completely
(commented out) once you are at that level.

There are more than one weak spot in your layout, as the 'freeze' isn't
caused by the same element as the visibility-problem. All I know is that
giving the right elements layout will cure both the freeze and the
visibility problem.

>> As /you/ know, adding 'hasLayout' triggers may have pretty nasty 
>> side-effects if not done properly and selectively. Not something we
>>  should do to a weak layout. Hopefully the layout/css is better now
>>  - don't have time to check.

(Just to make it clear: I was referring to Ingo as that /you/ since I
commented on his posting. Ingo /should/ know ;-) )

> i tried all kinds of additions tio the stylesheet based on the 
> article, but no luck yet. Columns get shorter but no visible content.
> 
> 
Make sure you delete every piece of debugging code on a selector if it
doesn't work. One selector at a time, start with the outer elements and
work inwards.

Note also that the 'height: 0;' isn't the only "magic bullet" or
"complete disaster", depending on what we want to achieve.

The article list a number of normal properties that will automatically
trigger Layout in IE/win, like float: left/right, position: absolute,
display: inline-block, width: (whatever), height: (whatever) and zoom:
(whatever but preferably 1 or 100%).
It just so happen that IE will expand height to make content fit inside
when an element gain Layout, which is why even 'height: 0;' will work in
most cases. However, if that particular element needs to stay at a
certain height regardless of content, then 'height: 0;' will counteract
that and mess things up.

You may also have to throw 'position: relative;' into the mix at times,
because it is not just one simple bug at play in most cases. IE/win has
a few thousand bugs and bug-combinations it can throw at you - all more
or less related to the same old 'hasLayout' chaos in the Trident
rendering-engine.
---

regards
        Georg
[1]http://www.satzansatz.de/cssd/onhavinglayout.html
[2]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/cols/dnexpie/expie20050831.asp
-- 
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/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to