W3C home > Mailing lists > Public > www-style@w3.org > October 2002

RE: color: how to specify an area of?

From: Doug Schepers <doug@schepers.cc>
Date: Mon, 21 Oct 2002 04:44:21 -0400
To: <www-style@w3.org>

Hi, Jonathan-

> Is there a recognised or correct way to display an area of color,
> using css?
> if not, is one planned, and if not why not, this is plain weird.

Of course there is. You know that, Jonathan... it's called SVG. ;) Now we
just need to get more support for it -- say, native namespace support in IE,
NN, and Opera.

> The following works in a number of ua's but not ie6, as a 'broken' link
> is displayed.
> <style type="text/css">
>     .purple{background-color: #990099;}
> </style>
> <a><img class="purple" width="32" height="32" alt="Purple" ></a>

I've used a similar method to that (and the one of C. Bottelier), but be
careful if you want to print it. In IE, backgrounds don't get printed by
default. You can use the Unicode block character, which works pretty well
for this:

  <style type="text/css">
      font-size: 32px;

  <span class='purpleBlock'>&#9632;</span>


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002
Received on Monday, 21 October 2002 04:44:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:04 UTC