Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - substitute list sign

 
Thread Tools Search this Thread
Old 08-16-2006, 08:47 PM   #1
Default substitute list sign


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
--
To err is human. To forgive is divine.
To forget is also human...


Markus Wichmann
  Reply With Quote
Old 08-17-2006, 12:59 AM   #2
Mark Parnell
 
Posts: n/a
Default Re: substitute list sign

Deciding to do something for the good of humanity, Markus Wichmann
<> declared in alt.html:

> 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;}

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
  Reply With Quote
Old 08-17-2006, 09:00 PM   #3
Markus Wichmann
 
Posts: n/a
Default Re: substitute list sign

Mark Parnell schrieb:
> Deciding to do something for the good of humanity, Markus Wichmann
> <> declared in alt.html:
>
>> 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;}
>


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

--
To err is human. To forgive is divine.
To forget is also human...
  Reply With Quote
Old 08-18-2006, 01:05 AM   #4
Mark Parnell
 
Posts: n/a
Default Re: substitute list sign

Deciding to do something for the good of humanity, Markus Wichmann
<> declared in alt.html:

> 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.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Forum Jump