This email is to be read subject to the disclaimer below.

Hi Peter,

I don't think you got an answer to this problem - and I was surprised that
it worked as you described so I did a bit of digging.

The reason it happens is that elements are given a display type of:
display: list-item and according to CSS2.1 the list-style-type property
which is what sets the numbering only applies to elements with 'display:
list-item' (
http://www.w3.org/TR/CSS21/generate.html#propdef-list-style-type)

So as soon as you set the display type to inline the item is no longer
formatted as a list and hence no numbering.

To achieve the effect you want code something like this might help:
<style type=text/css>
li {width: 150px; border: 1px solid red; list-style-position:inside;
list-style-type:lower-alpha; float: left;}
</style>

<ol>
<li>some text</li>
<li>a little more text</li>
<li class="test">another bit</li>
<li>even a bit more</li>
</ol>

The only problem with it is that you must specify the same width for each
element.
Regards,
Mark Lynch
Development Manager - Business Innovation Online
Ernst & Young - Australia
http://www.eyware.com/
http://www.eyonline.com/
Direct: +612 9248 4038
Fax: +612 9248 4073
Mobile: +61 421 050 695


                                                                                       
                                                
                       Peter Ottery                                                    
                                                
                       <[EMAIL PROTECTED]         To:      "Web Standards Group 
(E-mail)" <[EMAIL PROTECTED]>                     
                       ork.com.au>             cc:                                     
                                                
                                               Subject: [WSG] a horizontal <ol> drops 
the numbers..?  [Virus checkedAU]                
                       20/01/2004                                                      
                                                
                       04:07 PM                                                        
                                                
                       Please respond                                                  
                                                
                       to wsg                                                          
                                                
                                                                                       
                                                
                                                                                       
                                                



gurus,
can anyone tell me why this code...
-----

<style type=text/css>
li {display: inline}
</style>

<ol>
<li>some text</li>
<li>a little more text</li>
<li>another bit</li>
<li>even a bit more</li>
</ol>

-----

...drops the numbers from the start of each list item as soon as you make
the list run horizontally?
I want to keep the numbers at the start of each item (its for a horizontal
'step by step' type indicator) so if anyone has any insights on how to
achieve that, that would be tops,

cheers,
pete



--------------------
NOTICE - This communication contains information which is confidential and
the copyright of Ernst & Young or a third party.

If you are not the intended recipient of this communication please delete
and destroy all copies and telephone Ernst & Young on 1800 655 717
immediately. If you are the intended recipient of this communication you
should not copy, disclose  or distribute this communication without the
authority of Ernst & Young.

Any views expressed in this Communication are those of the individual
sender, except where the sender specifically states them to be the views of
Ernst & Young.

Except as required at law, Ernst & Young does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained nor
that the communication is free of errors, virus, interception or
interference.

Liability limited by the Accountants Scheme, approved under the
Professional Standards Act 1994 (NSW)
--------------------



*****************************************************
The discussion list for http://webstandardsgroup.org/
***************************************************** 

Reply via email to