On 10/29/10 2:13 AM, Foskett, Mike wrote:
[...]
David,

How, without using conditional comments at all, do I target IE 6,7,
and 8

From the example:

bg {background: #fff}

.IE6 bg,

.IE7 bg { filter: progid: etc...}

.IE8 bg { -ms-filter:" progid: etc"}


Precisely. I was asking how I'd be able to target all three *without*
any CCs.


Though I personally for what you're asking I'd do it in one style
rule like this:

.gradientBg {

background:#f1f0f3;

background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(0, #f8f7fa), color-stop(1, #cfcbd8));

background-image: -moz-linear-gradient(rgba(248,247,250, 1) 0%,
rgba(207,203,216, 1) 100%);

filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFf8f7fa,
endColorstr=#FFcfcbd8);

-ms-filter:"
progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFf8f7fa,
endColorstr=#FFcfcbd8))";

}

Covers everything you ask plus Firefox, Safari and IE8+.


Sorry, mate. That won't work. All IEs will get the solid background with
the filter "image" on top. Not what you'd want at all... :(

(FWIW - I actually tried this.)

And what about my browser of choice, Opera. Not popular in the US or UK,
I know, but has an equal presence with Safari and Chrome in Europe, an
even bigger presence in other parts of the world, and a major browser on
small devices like phones. RGBa() has my money...

Cordially,
David
--


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to