colours for bullets - this one is simple, works, & addresses the question

Gordon Blackstock writes:
 > I currently use this in one of my external style sheets:
 > 
 > ol    { color: IndianRed; }    /* specify text color */
 > li    { color: Orange; }         /* specify bullet color */
 >
 The early closing of the LI tag is once again an abuse of structured
 markup--
 so even though the hope is that style sheets will separate content
 and presentation, maybe there is no hope for the world after all...

 
 > The following code gives Orange markers and IndianRed text.
 > 
 > <ol>
 > <li></li> A style sheet is composed of rules, i.e., p { color: Indigo;
 > text-indent: 18pt;}.
 > <li></li> Rules are composed of selectors and declarations, i.e.,
 > <ol type=alpha>
 > <li></li> p [a selector] and 
 > <li></li> { color: Indigo; text-indent: 18pt;} [two declarations]. 
 > </ol>
 > <li></li> Declarations are composed of properties and values, i.e., 
 > <ol type=alpha>
 > <li></li> color [a property] and 
 > <li></li> Indigo [a value]. 
 > </ol>
 > </ol>
 > 
 > The trick to color separation is in closing the LI element. If it's left
 > unclosed, then the LI color will take precedence over the OL color and the
 > entire line is Orange.
 > 
 > BTW, this works in IE3.02 and in NN4.0b3. The exception is that the NN beta
 > does not implement inheritance very well yet! The placement I'm using is
 > within a pair of paragraph elements, but NN falls back to the body margins
 > for list placement. If interested, this page can be viewed at
 > http://gordon.diginsite.com/css/css_info.html  (go easy on your review of
 > this material as it is intended for the company intranet !).
 > 
 > enjoy,
 > gordon
 > gordon@gly.fsu.edu 
 > 
 > ----------
 > > From: Dan Connolly <connolly@w3.org>
 > > To: Christopher Kho <coop2e82@nortel.ca>
 > > Cc: www-html@w3.org; www-style@w3.org
 > > Subject: Re: colours for bullets
 > > Date: Monday, April 14, 1997 8:47 AM
 > > 
 > > Christopher Kho wrote:
 > > > 
 > > > Hey everyone. Is there a way to change the colour of a bullet for an LI
 > in
 > > > an unordered list without having to use GIFs as a substitute?
 > > 
 > > Not in HTML, but you should be able to do this with stylesheets.
 > > 
 > > [follow-ups to www-style, please]
 > > 
 > > See:
 > > http://www.w3.org/pub/WWW/TR/REC-CSS1#list-style
 > > 
 > > Hmmm... it's not clear to me that the color of the 'disc' can
 > > be specified in CSS1.
 > > 
 > > Can anybody come up with actual syntax that works?
 > > 
 > > -- 
 > > Dan Connolly, W3C Architecture Domain Lead
 > > <connolly@w3.org> +1 512 310-2971
 > > http://www.w3.org/People/Connolly/
 > > PGP:EDF8 A8E4 F3BB 0F3C FD1B 7BE0 716C FF21
 > > 

-- 
Best Regards,
--raman

      Adobe Systems                 Tel: 1 (408) 536 3945   (W14-129)
      Advanced Technology Group     Fax: 1 (408) 537 4042 
      (W14 129) 345 Park Avenue     Email: raman@adobe.com 
      San Jose , CA 95110 -2704     Email:  raman@cs.cornell.edu
      http://labrador.corp.adobe.com/~raman/raman.html (Adobe  Internal)
      http://www.cs.cornell.edu/Info/People/raman/raman.html  (Cornell)
-----------------------------------------------------------------------
    Disclaimer: The opinions expressed are my own and in no way should be taken
as representative of my employer, Adobe Systems Inc.
____________________________________________________________

Received on Tuesday, 15 April 1997 11:35:36 UTC