>> (definitely! I can create a bigger and more complex mess _with_ CSS,
>> than anyone could do before CSS... :-) )
> The humour helps! ; - )
Sometimes humor is all we can throw at weak and buggy browsers. The fact
remains though: we can be much more creative with CSS than without it -
even in IE/win.
> I've studied your code, and have saved it for future reference. Your comments show that you've
> number of specific hacks/workarounds (eg, the body's text-align: center for IE, the
> overflow: hidden used to [i think] subdue the 'hasLayout' in IE, etc). I'd like to find
> explanations of both the hacks and the problems they undo, so that I can understand the
> principles, rather than simply imitate the code.
I agree 100%. Copying without understanding how things work, is a recipe
The functionality of 'overflow: hidden' I use is described here...
.... and an understanding of how 'Block formatting contexts' works in
standard compliant browsers will help in understanding how IE's
non-standard 'Layout' works.
> However, I'm new at all of this, and don't understand
> many of the references and terminology I encounter along the way (eg,
> which Alan so kindly provided).
That's the only somewhat correct and complete article about IE's
'hasLayout' bug you can find today, but "designed bugs" like that are
always hard to describe in simple terms. That's true even for one who
have a clear understanding of a particular bug in a particular browser,
and can use that knowledge forwards and backwards and full circle. I
know how hard such "simplification" is, since I'm one of the authors
behind that 'hasLayout' article.
> I've been studying Eric Meyer's CSS-Definitive Guide for three months now, but he doesn't even
> mention the hasLayout problem. (One would think that a detailed explanation of absolute
> which he furnishes - should include the rather important disclaimer that nothing else will work
when using it in IE!
> Some tried-and-true hacks/workaround to employ so that one can actually use the absolute
> details would also seem fitting.)
Haven't read the mentioned book (and probably never will), but I guess
IE's Layout bug wasn't very well known/understood when Eric wrote it.
Also: I don't think a disclaimer would be of much use, and it would have
to be conditioned.
IMO: the easiest workaround for problems with absolute positioning, is
not to use A:P to lay out major parts of anything but very simple pages.
Absolute positioning is inherently inflexible because A:P elements are
taken out of the flow, thus A:P is best reserved for shuffling minor
document-parts around once the main parts are under control with some
other layout method.
I still base most layouts on this method...
....and add A:P and other methods on top of it when needed.
> Any suggestions as to where a beginner like me can find understandable explanations for the hacks
> workarounds used for IE and the problems they address?
Look for CSS support first...
....so at least you can check what to expect across browser-land. IE6 and
7 are well documented. No such list can ever be complete though, because
some weaknesses/bugs will only show up for certain source-code/CSS
Next step should be to develop your own set of methods that you know
will work in all major non-IE browsers, and not give in to IE's bugs and
weaknesses. IE can almost always be beaten into submission once all
other browsers are working well.
People here on [css-d] can help you find the right workarounds for IE as
you go along, and let you know what to do in the rare cases when IE
can't be fixed by CSS alone.
Thirdly: create lots of test pages - subject them to all options you can
find in any browser you can lay your hands on - and break your own pages
before letting any user (visitor) get a chance at breaking them. All web
designs can be broken one way or another, but a good design should be
able to take quite a bit without major failures.
Such an exercise will also help when it comes to understanding how
visitors _may_ use their browsers, and you should know more about all
major browsers than most visitors do if you want to create somewhat
robust and reliable designs for/in those browsers.
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/