Brett wrote:
> I am having a problem with IE6 rendering a background color on the H2
>  element *sometimes*.

That IE bug is well known but can be hard to describe.

It is a stacking-bug in that one or more layers of the element get
stacked behind whatever element, container, the element should be
rendered in front of.


Browsers' rendering engines always split up an element, any element, in
layers before actual rendering. They then handle the element as
foreground layer(s) and various background and border layers stacked in
a certain order. In the process all sane browser will keep these layers
together and lay them out visually so they appear as parts of the same
element - stacked in the right order.

IE6 and older seem to drop or lose track of where an element's layers
should be stacked in relation to layers of the element it is to be
layered on top of, and one or more of the background layers may then
disappear or be rendered inconsistently - on and off when page is
scrolled or reloaded.


The usual pin-pointing of and fixes for that bug are as follows:
- adding 'zoom: 1' (or another 'hasLayout'[1] trigger) to the h2 styles.
- adding 'position: relative' to the h2 styles.
- adding both the above to the h2 styles.

These remedies make IE6 pull all layers that belong to that element
together, which in most cases is enough to fix the stacking relative to
other elements in the background.

Sometimes the easy fix is to add the styles/fixes above to the element's
container, to the same visual effect.

regards
        Georg

[1]http://www.satzansatz.de/cssd/onhavinglayout.html
-- 
http://www.gunlaug.no
______________________________________________________________________
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