G
Gary McPherson
I've observed some very unhelpful behaviour from IE6 when trying to
manipulate the clip values of an element. If the values are delimited
using commas (which I discovered was necessary for CSS validation), then
IE fails to acknowledge the clip value at all. I tried moving the
definitions from inline style attributes to a stylesheet, but it behaves
in the same way, even stripping the rule out of the cssText property.
Following some more investigation, I discovered that the problem is only
exhibited when standards-compliant mode is enabled. Hmmm, let's see...
W3C standards for clip declaration require comma-delimited clip values.
IE in so-called standards-compliant mode completely ignores any such
declaration, yet it happily processes them when in quirks mode - go figure!
Essentially, this will validate as CSS, but breaks IE:
#myElem { clip: rect(5px,25px,25px,5px); }
style="clip: rect(5px,25px,25px,5px);"
while this will work but not validate as CSS:
#myElem { clip: rect(5px 25px 25px 5px); } or
style="clip: rect(5px 25px 25px 5px);"
Curiously, I tried making up a rule for an arbitrary "iclip" value,
which IE retrieves just fine and I could always parse out to set the
real clip values. Of course, it wouldn't validate as CSS, but it
indicates that IE has a specific expectation of the clip string format
that doesn't match the W3C standard. I've Googled thoroughly for this,
but haven't found any instances relating to this particular bug, so I'm
hoping someone here can help me out. I can knock up a demo page if
anyone needs a live example.
Thanks in advance,
Gary
manipulate the clip values of an element. If the values are delimited
using commas (which I discovered was necessary for CSS validation), then
IE fails to acknowledge the clip value at all. I tried moving the
definitions from inline style attributes to a stylesheet, but it behaves
in the same way, even stripping the rule out of the cssText property.
Following some more investigation, I discovered that the problem is only
exhibited when standards-compliant mode is enabled. Hmmm, let's see...
W3C standards for clip declaration require comma-delimited clip values.
IE in so-called standards-compliant mode completely ignores any such
declaration, yet it happily processes them when in quirks mode - go figure!
Essentially, this will validate as CSS, but breaks IE:
#myElem { clip: rect(5px,25px,25px,5px); }
style="clip: rect(5px,25px,25px,5px);"
while this will work but not validate as CSS:
#myElem { clip: rect(5px 25px 25px 5px); } or
style="clip: rect(5px 25px 25px 5px);"
Curiously, I tried making up a rule for an arbitrary "iclip" value,
which IE retrieves just fine and I could always parse out to set the
real clip values. Of course, it wouldn't validate as CSS, but it
indicates that IE has a specific expectation of the clip string format
that doesn't match the W3C standard. I've Googled thoroughly for this,
but haven't found any instances relating to this particular bug, so I'm
hoping someone here can help me out. I can knock up a demo page if
anyone needs a live example.
Thanks in advance,
Gary