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>
Message-ID: <AMEGKJJNEDNKEEMEHFOFCEBEDLAA.doug@schepers.cc>

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">
   .purpleBlock
      {
      color:#909;
      font-size: 32px;
      }
  </style>


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

-Doug

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:16 GMT