HighDots Forums  

Can a numbered list start at something > 1?

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


Discuss Can a numbered list start at something > 1? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Evertjan.
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 03:04 AM






Dave Rado wrote on 27 dec 2007 in
comp.infosystems.www.authoring.stylesheets:

Quote:
With regards to your <div class="wrapper"> suggestion, I get the same
problem with it as with Jonathan's "box" - I need the simulated
"document page" to have a fixed width and I can't see any way to
achieve that with your method - is it possible?

In general,
if lists do not turn out as you like,
why not use a table?

<style type='text/css'>
..t td.l {text-align:right;
padding:0 5px 5px 15px;
font-weight:bold;}
</style>

<table class=t>
<tr><td class=l>1.<td>Blah blah
<tr><td class=l>100.<td>Blah blah
<tr><td class=l>7.<td>Blah blah
<tr><td class=l>12.<td>Blah blah
</table>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Reply With Quote
  #32  
Old   
Dave Rado
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 03:08 AM






Hi Micha

Sorry for the delayed reply - I've been offline for a few days.

On 19 Dec, 18:30, Michael Fesser <neti... (AT) gmx (DOT) de> wrote:
Quote:
First you should add a proper document type declaration. Without one the
page will be rendered in quirks mode in most browsers, where all kinds
of strange things may happen.
I've now done so, but the problem is still there.

Quote:
Then you could try to apply the 'list-style' property to the 'li'
elements instead of the 'ul'. It should work both ways since 'list-
style' is inherited, but you never know what IE makes of it ...
I've tried that now, but it makes no difference - see: http://tinyurl.com/2lzxwk.

Quote:
Additionally you don't need both 'list-style-type' and 'list-style' -
the second is a just shorthand property and already contains/sets the
first one.
I did both out of desperation because neither was working on its own!

Dave


Reply With Quote
  #33  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 03:32 AM



Scripsit Evertjan.:

Quote:
In general,
if lists do not turn out as you like,
why not use a table?
Or if you really have a table, why would you use list markup for it?

Quote:
style type='text/css'
.t td.l {text-align:right;
padding:0 5px 5px 15px;
font-weight:bold;}
/style

table class=t
tr><td class=l>1.<td>Blah blah
tr><td class=l>100.<td>Blah blah
tr><td class=l>7.<td>Blah blah
tr><td class=l>12.<td>Blah blah
/table
This really looks like a table, consisting of pairs (rows) of numbers
and pieces of text. List markup would be less natural, and why would you
use CSS to create such a strange numbering? Besides, CSS is currently
ineffective in such issues. Using HTML, with <td value="...">, would
work, for some values of "work", but if the numbers are nowhere near to
consecutive, this really doesn't look like a numbered list.

It would be slightly more logical to use <th> markup for the cells
containing numbers, since they presumable act as row headings of a kind.
Then you would not need the class=l attributes.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #34  
Old   
Dave Rado
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 04:44 AM



On 27 Dec, 09:32, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:
Quote:
Scripsit Evertjan.:

In general,
if lists do not turn out as you like,
why not use a table?

Or if you really have a table, why would you use list markup for it?

style type='text/css'
.t td.l {text-align:right;
padding:0 5px 5px 15px;
font-weight:bold;}
/style

table class=t
tr><td class=l>1.<td>Blah blah
tr><td class=l>100.<td>Blah blah
tr><td class=l>7.<td>Blah blah
tr><td class=l>12.<td>Blah blah
/table

This really looks like a table, consisting of pairs (rows) of numbers
and pieces of text. List markup would be less natural, and why would you
use CSS to create such a strange numbering? Besides, CSS is currently
ineffective in such issues. Using HTML, with <td value="...">, would
work, for some values of "work", but if the numbers are nowhere near to
consecutive, this really doesn't look like a numbered list.

It would be slightly more logical to use <th> markup for the cells
containing numbers, since they presumable act as row headings of a kind.
Then you would not need the class=l attributes.

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
Hi Jukka

I don't know where those numbers came from - my lists all use
sequential numbering.

Dave


Reply With Quote
  #35  
Old   
Dave Rado
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 04:55 AM



On 27 Dec, 09:04, "Evertjan." <exjxw.hannivo... (AT) interxnl (DOT) net> wrote:
Quote:
Dave Rado wrote on 27 dec 2007 in
comp.infosystems.www.authoring.stylesheets:

With regards to your <div class="wrapper"> suggestion, I get the same
problem with it as with Jonathan's "box" - I need the simulated
"document page" to have a fixed width and I can't see any way to
achieve that with your method - is it possible?

In general,
if lists do not turn out as you like,
why not use a table?

style type='text/css'
.t td.l {text-align:right;
padding:0 5px 5px 15px;
font-weight:bold;}
/style

table class=t
tr><td class=l>1.<td>Blah blah
tr><td class=l>100.<td>Blah blah
tr><td class=l>7.<td>Blah blah
tr><td class=l>12.<td>Blah blah
/table

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi Evertjan

I'm not sure where those numbers came from - I always use sequential
numbering in my lists (although a complication is that I often use
outline numbering; and another complication is that I prefer left-
aligned to right-aligned numbering, which I've posted about in a
separate thread).

The reason for sometimes wanting a list to start at something other
than 1, which I posted about originally, was when a list is a
continuation from a previous page - but VK suggested using <ol
start="number"> for that situation, which seems to work well.

I have always used tables for all my lists up to now, but I'm trying
to see whether I can use css instead.

I think you may be misreading what I wrote to Berg - the section of my
post that you quoted was regarding his suggestion not to use a table
for the design of the simulated "document page" but to use a div
wrapper instead.

Dave


Reply With Quote
  #36  
Old   
Evertjan.
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 08:59 AM



Dave Rado wrote on 27 dec 2007 in
comp.infosystems.www.authoring.stylesheets:

Quote:
On 27 Dec, 09:04, "Evertjan." <exjxw.hannivo... (AT) interxnl (DOT) net> wrote:
Dave Rado wrote on 27 dec 2007 in
comp.infosystems.www.authoring.stylesheets:

With regards to your <div class="wrapper"> suggestion, I get the
same problem with it as with Jonathan's "box" - I need the
simulated "document page" to have a fixed width and I can't see any
way to achieve that with your method - is it possible?

In general,
if lists do not turn out as you like,
why not use a table?

style type='text/css'
.t td.l {text-align:right;
padding:0 5px 5px 15px;
font-weight:bold;}
/style

table class=t
tr><td class=l>1.<td>Blah blah
tr><td class=l>100.<td>Blah blah
tr><td class=l>7.<td>Blah blah
tr><td class=l>12.<td>Blah blah
/table
[please do not quote signatures]
Quote:
Hi Evertjan

I'm not sure where those numbers came from - I always use sequential
numbering in my lists (although a complication is that I often use
outline numbering; and another complication is that I prefer left-
aligned to right-aligned numbering, which I've posted about in a
separate thread).
The numbers were just to show that they are a free choice.
You could start by 2 and number consecutive, number by Javascript
or numbr this serverside.

ASP-JS example:

<tr><th><%= n=2 %>.<td>....
<tr><th><%= ++n %>.<td>....
<tr><th><%= ++n %>.<td>....
<tr><th><%= ++n %>.<td>....

Quote:
The reason for sometimes wanting a list to start at something other
than 1, which I posted about originally, was when a list is a
continuation from a previous page - but VK suggested using <ol
start="number"> for that situation, which seems to work well.

I have always used tables for all my lists up to now, but I'm trying
to see whether I can use css instead.
meseems it is <ol><li> in sted of <table>, both are CSS changeable.

Quote:
I think you may be misreading what I wrote to Berg - the section of my
post that you quoted was regarding his suggestion not to use a table
for the design of the simulated "document page" but to use a div
wrapper instead.
I see, Dave.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


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

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 11:32 AM



Dave Rado wrote:

Quote:
Very clever, but my simulated "document page" needs to have a fixed
width, whereas your "box" resizes if you resize your window. Is there
a way of doing it without tables that allows you to make the "box" 700
pixels wide regardless of the window size (and for it to still be
horizontally centred on the page)?
Yes, as stated by in your multi-posted message in
comp.infosystems.www.authoring.html by John

http://message-id.net/<47735ebf$1_4 (AT) news (DOT) bluewin.ch>

Quote:
Also on some pages I need to be able to put things in the grey area
above the simulated "document page", which is easy using tables (the
"page" has a grey row above the white bit) - but can this be done
easilywith your method?
But as I pointed out there, a fixed 700px page makes things difficult
for small screens...

--
Take care,

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


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

Default Re: Can a numbered list start at something > 1? - 12-27-2007 , 02:08 PM



In article
<70123fbe-36fd-4924-b1be-a89191f916a6 (AT) a35g2000prf (DOT) googlegroups.co
m>,
Dave Rado <dave.rado (AT) dsl (DOT) pipex.com> wrote:

Quote:
I have always used tables for all my lists up to now, but I'm trying
to see whether I can use css instead.
Just to make one thing clear, if the list is unordered then
almost always the right thing to do is to use a proper unordered
html list and style it. So it is important to keep trying on this
one. The situation with ordered lists is different, here there is
less pressure for reasons I have given you, to try too hard.

--
dorayme


Reply With Quote
  #39  
Old   
Dave Rado
 
Posts: n/a

Default Re: Can a numbered list start at something > 1? - 12-28-2007 , 12:27 PM



On 27 Dec, 17:32, "Jonathan N. Little" <lws4... (AT) centralva (DOT) net> wrote:
Quote:
Dave Rado wrote:
Very clever, but my simulated "document page" needs to have a fixed
width, whereas your "box" resizes if you resize your window. Is there
a way of doing it without tables that allows you to make the "box" 700
pixels wide regardless of the window size (and for it to still be
horizontally centred on the page)?

Yes, as stated by in your multi-posted message in
comp.infosystems.www.authoring.htmlby John

http://message-id.net/<47735ebf$... (AT) news (DOT) bluewin.ch

Also on some pages I need to be able to put things in the grey area
above the simulated "document page", which is easy using tables (the
"page" has a grey row above the white bit) - but can this be done
easilywith your method?

But as I pointed out there, a fixed 700px page makes things difficult
for small screens...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
All graphics of any significant width also make life difficult for
small screens - do you want to ban graphics from the web as well? Some
content is appropropriate for people using small screens, and other
content is not. You can't cater for everyone all of the time. Life is
full of compromises.

Dave


Dave


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

Default Re: Can a numbered list start at something > 1? - 12-28-2007 , 12:35 PM



Dave Rado wrote:

Quote:
All graphics of any significant width also make life difficult for
small screens - do you want to ban graphics from the web as well? Some
content is appropropriate for people using small screens, and other
content is not. You can't cater for everyone all of the time. Life is
full of compromises.
True, but we are not talking about images but text, so why create the
artificial barrier? With respect to images, I would refrain from 700px
to ones 300-500px.

--
Take care,

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


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 - 2008, Jelsoft Enterprises Ltd.