substitute list sign

M

Markus Wichmann

Hi all,
sorry if I'm asking a question that has been answered 5000 times before,
but I didn't find a thing on that in Google. I want to do the following:
If I use subordinating lists, each ordered list counts for itself (which
is good), but I'd like to prepend the other numbers. So that it looks
like this:
Now:
1. bar
1. foo
2. foobar
Then:
1. bar
1.1. foo
1.2. foobar

The other thing I'd like to do, is to remove the sign completely in
unordered lists. Is there a way to do this with css? Or without, but
without using a deprecated method? I wanted to append a "valid
HTML"-picture on my file, when it's done. And because I'm using the
"strict" dialect that is only possible with undeprecated methods.
tia and cu
nullplan
 
M

Mark Parnell

Deciding to do something for the good of humanity, Markus Wichmann
If I use subordinating lists, each ordered list counts for itself (which
is good), but I'd like to prepend the other numbers.

This would be possible using CSS counters, but browser support is very
poor.

http://www.w3.org/TR/CSS21/generate.html#counters

Other than that you would probably have to use some sort of
pre-processing to generate the numbers.
The other thing I'd like to do, is to remove the sign completely in
unordered lists.

ul {list-style-type: none;}
 
M

Markus Wichmann

Mark said:
Deciding to do something for the good of humanity, Markus Wichmann


This would be possible using CSS counters, but browser support is very
poor.

http://www.w3.org/TR/CSS21/generate.html#counters

Other than that you would probably have to use some sort of
pre-processing to generate the numbers.


ul {list-style-type: none;}

Well, that one with ul worked, thanks for that. And I finally got it
right with the counters. I used the following:

ol {counter-reset: item}
ol li { display:block }
ol li:before {content: counters(item,".") " ";
counter-increment: item;
}
ul li:before { content: normal;
counter-increment: none;
}

This works fine with my list. It has multiple nested ordered lists, but
there are a few unordered list, which should be displayed with text and
markup (hyperlinks, e.g.) only.
Thanks again and
cu,
nullplan
 
M

Mark Parnell

Deciding to do something for the good of humanity, Markus Wichmann
Well, that one with ul worked, thanks for that.

You're welcome.
And I finally got it right with the counters.

In what browsers? I'd be very surprised if it worked in IE - IIRC IE
doesn't support counters at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top