I've been using CSS for almost six years. During this period, sometimes I wondered about some obscure details of CSS specifications. These details are listed below.

        • LAYERING AND STACKING ORDER
When elements are absolutely positioned, it's crucial to determine how they should be overlapped. The problem is that most browsers don't agree on how this stacking order should be displayed. For example, consider the following:

view plainprint?
                • #container {
                •   position: relative;
                • }
                •
                • #child {
                •   position: absolute;
                •   z-index: -1;
                • }
In this case, this element should not be displayed, since we gave to it a negative z-index. Unfortunately, some browsers don't consider 0 as the starting value for the stacking order, so this rule won't work in some cases.

        • CLEARING AND CONTAINING FLOATS
As developers, we all know a series of techniques for clearing and containing floats, which includes:

                • overflow:auto/hidden
                • position: absolute
I mentioned only those that keep me wondering about how they actually work. We all know that floats make vertical space collapse. However, when the former declaration is applied to a parent element, browsers automatically expand the available vertical space to include floats, even when those floats have no stated height. So we should assume that browsers automatically calculate the height of these elements and react accordingly.

Instead, the latter declaration is even more complicated. We just assume that the vertical space is calculated again according to the actual height of floats, but I don't think this is a sufficient explanation. CSS specifications don't say much about this issue. More precisely, they don't say much about the general problem of clearing and containing floats.

        • NEGATIVE MARGINS
The question is: "How negative margins affect the computation of the overall dimensions of a containing block?" By subtracting a given length, both horizontal and vertical, what is the computed value of the width and height of a containing block? This should be further investigated.



http://www.css-zibaldone.com
http://www.css-zibaldone.com/test/  (English)
http://www.css-zibaldone.com/articles/  (English)
http://onwebdev.blogspot.com/  (English)








______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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