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

Re: color: how to specify an area of?

From: C. Bottelier <c.bottelier@ITsec.nl>
Date: Sun, 20 Oct 2002 20:41:38 +0200
Message-Id: <5.1.0.14.0.20021020202703.00a412a0@mail.ITsec.nl>
To: Jonathan Chetwynd <j.chetwynd@btinternet.com>, www-style@w3.org

At 19:39 20-10-02, Jonathan Chetwynd wrote:
>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.

If you would have an rectangular area filled with a specific color
one could use the following.

<STYLE type="text/css">
   .purple {
     padding : 1em 1.5em 1em 1.5em;
     background-color: #990099;
   }
</STYLE>

<p>This line should contain a purple <span title="Purple area" 
class="purple"></span> rectangle.


Note here that the title="" causes a tooltip when the mouse is
over the area. (Nice when colours are supressed)

Christian
Received on Sunday, 20 October 2002 14:34:25 GMT

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