HighDots Forums  

nested list to show 1.1

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


Discuss nested list to show 1.1 in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mlf
 
Posts: n/a

Default nested list to show 1.1 - 03-07-2005 , 05:16 PM






Is there a clever way, or any way for that matter, to have a nested list
show 1.1, 1.2, 1.3...2.1, 2.2, etc?


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

Default Re: nested list to show 1.1 - 03-07-2005 , 05:29 PM






mlf <vze1 (AT) verzon (DOT) net> wrote:

Quote:
Is there a clever way, or any way for that matter, to have a nested
list show 1.1, 1.2, 1.3...2.1, 2.2, etc?
Not in CSS as currently defined and implemented. The best approach is
to include the numbers into the list items themselves and use <ul>
markup together with list-style-type: none.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #3  
Old   
Johannes Koch
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-07-2005 , 05:36 PM



Jukka K. Korpela wrote:
Quote:
mlf <vze1 (AT) verzon (DOT) net> wrote:


Is there a clever way, or any way for that matter, to have a nested
list show 1.1, 1.2, 1.3...2.1, 2.2, etc?


Not in CSS as currently defined and implemented. The best approach is
to include the numbers into the list items themselves and use <ul
markup together with list-style-type: none.
.... and hope that the list item text does not wrap. Or play with
margin-, padding-left and negative text-indent.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #4  
Old   
Richard
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-07-2005 , 05:58 PM



On Mon, 07 Mar 2005 22:16:45 GMT mlf wrote:

Quote:
Is there a clever way, or any way for that matter, to have a nested list
show 1.1, 1.2, 1.3...2.1, 2.2, etc?
For a csss version see www.suckerfish.org
javascript version see www.4thorder.us
For a working demo see www.somestuff.batcave.net




Reply With Quote
  #5  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-07-2005 , 07:00 PM



in comp.infosystems.www.authoring.stylesheets, Johannes Koch wrote:
Quote:
Jukka K. Korpela wrote:
mlf <vze1 (AT) verzon (DOT) net> wrote:


Is there a clever way, or any way for that matter, to have a nested
list show 1.1, 1.2, 1.3...2.1, 2.2, etc?
Example:
http://www.student.oulu.fi/~laurirai...alifornia.html
(list floated left)
Works with only Opera, since version 5, IIRC. (could be v4). Should
degrade ok on all browsers, but shouldn't be used if it is important to
get numbers right.

Quote:
Not in CSS as currently defined and implemented.
Especially implemented. Also, often it is questionable if it is just
style, but also content.

Quote:
The best approach is
to include the numbers into the list items themselves and use <ul
markup together with list-style-type: none.
I would use ol, if order of list items is important, but numbering style
is not. But usually ul is good.

Quote:
... and hope that the list item text does not wrap. Or play with
margin-, padding-left and negative text-indent.
Floating marker will work ok. See for example
http://www.student.oulu.fi/~laurirai...2.html#lahteet
(I can't remember why I didn't use ol, but at least we have example...
Content on that site might be bullshit as well, but most of you won't
understand it anyway, as it is Finnish...)

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.


Reply With Quote
  #6  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-07-2005 , 08:10 PM



Richard wrote:

Quote:
On Mon, 07 Mar 2005 22:16:45 GMT mlf wrote:

Is there a clever way, or any way for that matter, to have a
nested list show 1.1, 1.2, 1.3...2.1, 2.2, etc?

For a csss version see www.suckerfish.org
Site not found.
http://dnsstuff.com/tools/whois.ch?ip=suckerfish.org

Quote:
javascript version see www.4thorder.us
Don't see any 1.1, 1.2 .. lists on that page, and there is some amount
of text *outside* the left margin of my browser. Poor layout.

Quote:
For a working demo see www.somestuff.batcave.net
One of the worst pages I've seen in years.

mlf: disregard Richard's advice.

--
-bts
-This space intentionally left blank.


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

Default Re: nested list to show 1.1 - 03-08-2005 , 02:12 AM



Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> wrote:

Quote:
The best approach is
to include the numbers into the list items themselves and use
ul> markup together with list-style-type: none.

I would use ol, if order of list items is important, but numbering
style is not. But usually ul is good.
Using ol implies the risk (well, certainty) of getting extra numbers,
like
3 1.3
where 1.3 is the number you have in the content and 3 is the browser
generated number, when CSS is not in use or your style sheet is
overridden (some users might conceivably want to enforce their own
preferred numbering style for numbered lists).

You could reduce the risks by using <ol type="disc">, but that would
really just say that you want to have the list unnumbered but still use
<ol> markup.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #8  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-08-2005 , 10:36 AM



Richard wrote:
Quote:
On Mon, 07 Mar 2005 20:10:34 -0500 Beauregard T. Shagnasty wrote:
[Richard wrote:]
Quote:
javascript version see www.4thorder.us

Don't see any 1.1, 1.2 .. lists on that page, and there is some
amount of text *outside* the left margin of my browser. Poor
layout.

Sheesh. You just have to nitpick don't you?
When you give bad or irrelevant advice...

Quote:
1.0 would be equal to ul li.
1.1 would be equal to ul li li.
...which has nothing whatsoever to do with the OP's question, who
wanted an <ol><li> _list_item_number_ to be 1.1, 1.2 ...

Quote:
For a working demo see www.somestuff.batcave.net

One of the worst pages I've seen in years.

Then you ain't seen many have you?
Few that are that bad.

Quote:
You forgot to mention www.rts.batcave.net Speaking of shitty pages.
...which of course is a pure parody of your own unworthy site. It
should be shitty.

--
-bts
-This space intentionally left blank.


Reply With Quote
  #9  
Old   
Steve Pugh
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-08-2005 , 10:46 AM



"Richard" <Anonymous (AT) 127 (DOT) 001> wrote:
Quote:
On Mon, 07 Mar 2005 20:10:34 -0500 Beauregard T. Shagnasty wrote:
Richard wrote:
On Mon, 07 Mar 2005 22:16:45 GMT mlf wrote:

Is there a clever way, or any way for that matter, to have a
nested list show 1.1, 1.2, 1.3...2.1, 2.2, etc?

For a csss version see www.suckerfish.org

Site not found.
http://dnsstuff.com/tools/whois.ch?ip=suckerfish.org

javascript version see www.4thorder.us

Don't see any 1.1, 1.2 .. lists on that page, and there is some amount
of text *outside* the left margin of my browser. Poor layout.

Sheesh. You just have to nitpick don't you?
1.0 would be equal to ul li.
But what's the code to make the browser display the 1.0? ul li just
selects all li elements that are descendents of ul elements. Big deal.
Now add the desired numbering

Quote:
1.1 would be equal to ul li li.
Again, that just selects all li elements that are descendents of li
element that are in turn descendents of ul elements. How do you add
the numbering?

Please post your code that creates an automatically numbered list
where the number in the sub-list goes 1.1, 1.2, 1.3, etc. This is
something that people have wanted for many years but none of the
experts here and elsewhere have ever been able to create with current
CSS. If you can do this then (a) we'd all be very amazed and (b) we'd
all be very grateful. Come on show us an example.

I don't believe it can be done with CSS at present. I'd be interested
in testing the robustness and fallback in a JS solution if you have
one of those.

Quote:
For a working demo see www.somestuff.batcave.net

One of the worst pages I've seen in years.

Then you ain't seen many have you?
No, your page is very, very bad. And I see no lists with 1.1, 1.2, 1.3
numbering on your page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #10  
Old   
Steve Pugh
 
Posts: n/a

Default Re: nested list to show 1.1 - 03-08-2005 , 10:48 AM



"Richard" <Anonymous (AT) 127 (DOT) 001> wrote:
Quote:
On Mon, 7 Mar 2005 16:58:37 -0600 Richard wrote:
On Mon, 07 Mar 2005 22:16:45 GMT mlf wrote:

Is there a clever way, or any way for that matter, to have a nested list
show 1.1, 1.2, 1.3...2.1, 2.2, etc?

For a csss version see www.suckerfish.org
javascript version see www.4thorder.us
For a working demo see www.somestuff.batcave.net


Dang it. I keep forgetting the proper url.

http://www.htmldog.com/articles/suckerfish/dropdowns/
But where's the 1.1, 1.2, 1.3 numbering? The fact that the examples
all use <ul> - unordered lists rather than <ol> - ordered lists
suggests that these lists aren't supposed to be numbered? So why offer
them as an example of how to create a particular numbering style?

Having trouble with that pesky comprehension thing again?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


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.