On 11/1/10 3:15 AM, Foskett, Mike wrote:
Hi David,
How, without using conditional comments at all, do I target IE
6,7, and 8
I was asking how I'd be able to target all three *without* any
CCs.
Add an extra script line?
<script type="text/javascript">/*<![CDATA[*/var
isIE=/*...@cc_on!@*/false;document.documentElement.className+="
isIE";/*]]>*/</script>
Not perfect but adequate for most cases.
Nice. But hardly more clear for future CSS coders than CCs, especially
if they don't know JavaScript?
.gradientBg {...
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... :(
I'll admit that snippet was untested but you can see a working
example here:
http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/
The "Browse" and "Convert image" are pure CSS. Background gradients
appear to work fine in IE6+, Firefox and Safari. Untested in Opera
though so please tell me if the button doesn't degrade well.
I considered the methods too clunky for use in production though.
Not quite so nice in Opera, but good. Unfortunately I was not asking
about gradients--my question involved emulating RGBa colored backgrounds
in Internet Explorer... :\
Cordially,
David
--
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************