Welcome to WebmasterWorld Guest from 34.236.171.181

Forum Moderators: not2easy

Message Too Old, No Replies

color: transparent

     
2:19 am on Jun 27, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15934
votes: 887


An excruciatingly simple question, but I can't figure out the right search query*, and caniuse dot com doesn't list it:

What is the earliest version of MSIE that recognizes "color: transparent"?

Note. Not alpha channels or opacity or layered backgrounds or RGBA or anything fancy. Just the simple keyword "transparent"-- the one that CSS <3 officially only recognized for "background-color", but most browsers happily accepted it for "color" all along.


* On account of how "color" is a substring of "background-color", and the hyphen - is a punctuation mark, and search engines won't go for (?<!background-).
7:49 am on June 27, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10569
votes: 1124


I think as early as 6x via some hacks, but certainly from 7 on.

My search was:

"color:transparent" -background explorer

In Bing.... try it elsewhere, or refine it further.
10:01 am on June 27, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:May 28, 2003
posts: 198
votes: 4


Color:transparent only works from IE9 plus. It does not work in ie6, 7 or 8.
4:08 pm on June 27, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15934
votes: 887


Gosh, I'm glad I only need to know this for an ebook. In case anyone wondered:
x {color: transparent; background: blahblah involving ditto marks;}
So
o wäre ich nur blahblah
<x>o wäre</x> <x>ich</x> <x>nur</x> otherblahblah
<x>o wäre</x> <x>ich</x> <x>nur</x> thirdblahblah
means that the "blahblah" elements line up exactly, regardless of font, but the beginning of each line only displays as ditto marks-- and if you copy-and-paste that second line by itself, the concealed text is included in the copy.

The difference between this and
x {visibility: hidden;}
is that "visibility: hidden" also suppresses display of the background. And "color: white" or similar conceals any bits of the background that happen to be covered with text, which creates an odd effect.

Fun fact which I've only recently discovered even though I've been making ebooks for years: In most browsers-- with the predictable exception of MSIE-- you can assign CSS properties to elements that do not exist in HTML. This is a great timesaver in the roughing-out stages because you don't have to decide right away which "real" element you want to assign the property to. Right now I've got <f> and <g>.