HighDots Forums  

Using CSS to set start number in an ordered list

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Using CSS to set start number in an ordered list in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
some old html fumbler
 
Posts: n/a

Default Using CSS to set start number in an ordered list - 09-12-2008 , 08:38 AM






I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.

I have a list of things that happen during the course of a year. Too
long a list is not helpful, so I only show maybe 3 months of items at
a time. The items have to be ordered according to the year, IOW I
can't list something in April as being #1.

In HTML after the first couple of months I just use this sort of code:
<ol start="14" type="1"> and go on.

I see that the "start" attribute is deprecated in HTML 4.01. I don't
know what to plug into my css stylesheet to get an ordered list to
start at a number I designate. Any suggestions?

Reply With Quote
  #2  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 08:53 AM






On Fri, 12 Sep 2008, some old html fumbler wrote:

Quote:
In HTML after the first couple of months I just use this sort of code:
ol start="14" type="1"> and go on.
Any suggestions?
Use "HTML 4.01 Transitional" and keep the START attribute.

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/


Reply With Quote
  #3  
Old   
Helpful person
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 10:51 AM



On Sep 12, 9:38*am, some old html fumbler <fumb... (AT) nospam (DOT) invalid>
wrote:
Quote:
I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.

I have a list of things that happen during the course of a year. Too
long a list is not helpful, so I only show maybe 3 months of items at
a time. The items have to be ordered according to the year, IOW I
can't list something in April as being #1.

In HTML after the first couple of months I just use this sort of code:
ol start="14" type="1"> and go on.

I see that the "start" attribute is deprecated in HTML 4.01. I don't
know what to plug into my css stylesheet to get an ordered list to
start at a number I designate. Any suggestions?
You could also set a class to {display: none} in the CSS and include
the obsolete lines in this class. I think this would work. Anyone
know for sure?


Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 12:58 PM



Helpful person wrote:
Quote:
On Sep 12, 9:38 am, some old html fumbler <fumb... (AT) nospam (DOT) invalid
wrote:

I see that the "start" attribute is deprecated in HTML 4.01. I don't
know what to plug into my css stylesheet to get an ordered list to
start at a number I designate. Any suggestions?

You could also set a class to {display: none} in the CSS and include
the obsolete lines in this class. I think this would work. Anyone
know for sure?
Huh?

Are you suggesting using 'display: none' to "hide" the deprecated
attributes 'start="14" type="1"'? Then no, absolutely not, it would just
prevent the OL from displaying altogether.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
some old html fumbler
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 01:30 PM



On Fri, 12 Sep 2008 10:53:10 -0400, "Jonathan N. Little"
Quote:
....
ol start="14"
li>If you want IE support and live with the deprecated attribute</li
li>Fee</li
li>Fie</li
li>Foe</li
li>Fum</li
/ol

/body
/html
Oh, IE won't even see it if I were to do accomplish it in CSS then?

*SIGH* I guess those pages just are never going to validate as HTML
4.01 strict then. I may as well just leave it transitional. Thanks.

And yet the "start" attribute is back for HTML 5.0 from what I see!
What a world.


Reply With Quote
  #6  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 01:48 PM



some old html fumbler wrote:
Quote:
On Fri, 12 Sep 2008 10:53:10 -0400, "Jonathan N. Little"
....
ol start="14"
li>If you want IE support and live with the deprecated attribute</li
li>Fee</li
li>Fie</li
li>Foe</li
li>Fum</li
/ol

/body
/html

Oh, IE won't even see it if I were to do accomplish it in CSS then?

*SIGH* I guess those pages just are never going to validate as HTML
4.01 strict then. I may as well just leave it transitional. Thanks.

No, just keep DOCTYPE 4.01 Strict. USing a deprecated attribute will not
prevent your page from displaying...don't fret about it.

Quote:
And yet the "start" attribute is back for HTML 5.0 from what I see!
What a world.
HTML5.0 is still pie-in-the-sky and some of the suggestions I are far
from useful IMHO. But hey, cheer up, maybe MS can get IE to support the
10-year-old standard with version 8 or 9 or 10... ;-)


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #7  
Old   
Helpful person
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 02:05 PM



On Sep 12, 1:58*pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:
Quote:
Helpful person wrote:
On Sep 12, 9:38 am, some old html fumbler <fumb... (AT) nospam (DOT) invalid
wrote:
I see that the "start" attribute is deprecated in HTML 4.01. I don't
know what to plug into my css stylesheet to get an ordered list to
start at a number I designate. Any suggestions?

You could also set a class to *{display: none} in the CSS and include
the obsolete lines in this class. *I think this would work. *Anyone
know for sure?

Huh?

Are you suggesting using 'display: none' to "hide" the deprecated
attributes 'start="14" type="1"'? Then no, absolutely not, it would just
prevent the OL from displaying altogether.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
No. I'm suggesting adding the class only to the items not wanted.
The main question I have is: Will the browser still use the non
displayed items to incement the numbers? (Or will it just count the
displayed items?)


Reply With Quote
  #8  
Old   
Chris F.A. Johnson
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 02:24 PM



On 2008-09-12, Helpful person wrote:
Quote:
On Sep 12, 9:38*am, some old html fumbler <fumb... (AT) nospam (DOT) invalid
wrote:
I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.

I have a list of things that happen during the course of a year. Too
long a list is not helpful, so I only show maybe 3 months of items at
a time. The items have to be ordered according to the year, IOW I
can't list something in April as being #1.

In HTML after the first couple of months I just use this sort of code:
ol start="14" type="1"> and go on.

I see that the "start" attribute is deprecated in HTML 4.01. I don't
know what to plug into my css stylesheet to get an ordered list to
start at a number I designate. Any suggestions?

You could also set a class to {display: none} in the CSS and include
the obsolete lines in this class. I think this would work. Anyone
know for sure?
It wouldn't work if CSS was turned off or if the browser didn't
support CSS.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-12-2008 , 04:29 PM



In article <ukrkc45529k2ssh9btk241a9qag6ctjrjd (AT) 4ax (DOT) com>,
some old html fumbler <fumbler (AT) nospam (DOT) invalid> wrote:

Quote:
I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.

I have a list of things that happen during the course of a year. Too
long a list is not helpful, so I only show maybe 3 months of items at
a time. The items have to be ordered according to the year, IOW I
can't list something in April as being #1.

So do the most straightforward thing you can do in this situation and
use simple HTML and simple CSS that is cross browser and cross earthling
win-win. Use a two column table in which the column on the left holds
the numbers. In fact why would you be wanting to have numbers when you
can have the date itself and be utterly clear?

--
dorayme


Reply With Quote
  #10  
Old   
some old html fumbler
 
Posts: n/a

Default Re: Using CSS to set start number in an ordered list - 09-13-2008 , 01:55 AM



On Sat, 13 Sep 2008 07:29:34 +1000, dorayme
<doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
In article <ukrkc45529k2ssh9btk241a9qag6ctjrjd (AT) 4ax (DOT) com>,
some old html fumbler <fumbler (AT) nospam (DOT) invalid> wrote:

I want to use CSS to get an ordered list to start with something other
than a 1 or equivalent.

I have a list of things that happen during the course of a year. Too
long a list is not helpful, so I only show maybe 3 months of items at
a time. The items have to be ordered according to the year, IOW I
can't list something in April as being #1.


So do the most straightforward thing you can do in this situation and
use simple HTML and simple CSS that is cross browser and cross earthling
win-win. Use a two column table in which the column on the left holds
the numbers. In fact why would you be wanting to have numbers when you
can have the date itself and be utterly clear?
I have both the date and the number of the item. The number of the
item is relevant and needs to be part of the list. I'm just going to
leave it all as a transitional doctype.

I find it bizarre that they took this out for 4.01 and have it back in
again for 5.0.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.