Previous Message
Next Message

Re: [css-d] How to nest font color changes?

Sent by Brad Cox on 16 August 2002 22:10


At 10:40 PM +0200 8/16/02, Jan! wrote:
>Terminate the <span> before each </li>, and begin a new one on each line:

Thanks for the clue; e.g. I was in violation of xhtml nesting conventions!

However I really don't want to emit color information on each line if 
I can help it, for download efficiency reasons but also because of 
coding complications.

So let me phrase the question more generally. What *IS* the best way 
of generating line numbered text in a fixed-width font, with nested 
color changes as I described before. One way that might work is:

<pre>
1.&nbsp;black<code class="even">red
2.&nbsp;red</code>black
</pre>

Is this a reccomended approach?

><ol>
><li><span class="even">Black black black </span><span 
>class="even">{{ Red red red</span></li>
><li><span class="even">Red red red </span><span class="odd">{{ Black 
>black black</span></li>
><!-- . . . -->
></ol>
>
>It should be trivial to program, and produces valid HTML. :-)
>You might even want to use <code class="even"> instead of a <span> 
>to also be semantically correct.
>--
>Jan!


-- 
Brad Cox, PhD; [EMAIL-REMOVED] 703 361 4751
o For industrial age goods there were checks and credit cards.
    For everything else there is http://virtualschool.edu/mybank
o Java Web Application Architecture: http://virtualschool.edu/jwaa
o Ruby Interactive Learning Environment http://virtualschool.edu/ile
Previous Message
Next Message

Message thread:

Possibly related: