Forum Moderators: not2easy

Message Too Old, No Replies

color: transparent

         

lucy24

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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-).

tangor

7:49 am on Jun 27, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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.

Paul_o_b

10:01 am on Jun 27, 2015 (gmt 0)

10+ Year Member



Color:transparent only works from IE9 plus. It does not work in ie6, 7 or 8.

lucy24

4:08 pm on Jun 27, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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>.