views:

287

answers:

2

Hi

I would like to know how well does Internet Explorer 6 interpret the following:

p img.blue, p img.red {
  border:(purple) 1px solid; /* (Please ignore any style errors) */
}

What I am interested in the application of multiple classes to the same style. I know that IE6 does not interpret the following correctly:

p img.blue.red {
  border:(purple) 1px solid; /* (Please ignore any style errors) */
}

Does anyone know a bit about this? Regards and TIA.

// edit:

Please note, I am enquiring about the first block of code.

A: 

I'll just quote Ryan Brill:

IE6 doesn't understand the chain of classes within a CSS selector, but rather only reads the last class

Teddy Zetterlund
So, if I understand you correctly, it interprets: p img.blue, p img.red { border:(purple) 1px solid; /* (Please ignore any style errors)*/ }as p img.red { border:(purple) 1px solid; /* (Please ignore any style errors)*/ }Is this correct?
Anriëtte Combrink
No, it interprets p img.blue, p img.red correctly (.blue *or* .red). It interprets p img.blue.red incorrectly (p img.red)
Iain Galloway
+3  A: 

IE interprets

p img.blue, p img.red { /* */ }

correctly, by applying the contained styles to img elements with class="blue" which are children of p elements, or img elements with class="red" which are children of p elements.

IE doesn't understand p img.blue.red, it would only apply the style to p img.red

Iain Galloway