Hi All,
Sorry for jumping in without waiting a few days after joining the
list, but I'm going round in circles. Having searched the 'net for a
couple of days I still can't get the format for the constitution of a
local community group right using CSS, so I'm turning to this list in
the hope of some words of wisdom before I give up and resort to PDF!
Any help will be gratefully received.
What I'm trying to do is create nested, ordered lists. This has to be
"legal" format - that is, the numbering from higher levels is carried
through: e.g.
1
1.1
1.2
1.2.1
1.2.2
1.3
2
2.1
(etc).
I need "proper" hanging indents (as you'd get with vanilla HTML). That
is, the first word after the para numbering is aligned with the second
and subsequent lines of the paragraph.
The best I've been able to do so far is:
<style type="text/css">
ol {
list-style-type: decimal;
list-style-position: outside;
counter-reset: item;
}
li {
display:block;
text-indent: -24px;
}
li:before {
content: counters(item, ".")" ";
counter-increment: item;
}
</style>
Unfortunately, this doesn't give "proper" hanging indents. So I'm
guessing I need some way of setting tab stops and inserting a tab
after each para number; or some way of reinstating the "standard" LI
behaviour while retaining the legal-style numbering.
Target browsers are any CSS2-compliant, although I suspect the
majority of readers will be using a late version of IE, FF, or Safari.
To complicate things slightly, some of the subordinate levels are
numbered alphabetically rather than numerically, but since I don't
need to carry the parent numbering to those I suspect I can deal with
that by creating another class of OL.
Thanks for looking,
--
Geoff
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/