E-mail List Archives
RE: Formatting lists
From: Jukka Korpela
Date: Oct 23, 2002 11:37PM
- Next message: Ian.Lloyd@nationwide.co.uk: "RE: Comments on a checklist requested"
- Previous message: Emma Jane Hogbin: "Re: FW: Formatting lists"
- Next message in Thread: Glenda Watson Hyatt: "RE: Formatting lists "
- Previous message in Thread: None
- View all messages in this Thread
Glenda Watson Hyatt wrote:
> I am working with ordered lists, and need to use parentheses
> around the numbers, ie (1)...(2)..., as used in legislation subsections.
In theory, you could use normal <ol> markup in HTML and counters and
generated content in CSS, as described in section 12 of the CSS2
specification:
http://www.w3.org/TR/REC-CSS2/generate.html
Example of a style sheet:
OL { counter-reset: item }
LI { display: block }
LI:before { content: "(" counter(item) ") ";
counter-increment: item }
But this is not a practical move at present. Browser support seems to be
limited to Opera. Non-CSS browsers naturally use their default presentation
for <ol>. The problems begin when browsers with _partial_ CSS support come
into the picture. For example, Netscape displays the list as completely
unnumbered and unbulleted.
> Or shall I stick to using paragraphs to maintain the
> punctuation? You know how gov't types are about that kind of stiff.
No, if it's logically a numbered list, use <ol> markup. This will help in
many situations where the visual presentation is irrelevant.
As a workaround, though, you might consider using <ul> markup with the
numbers as explicit content, and a CSS rule that suggests suppression of
bullets:
<style type="text/css">
ul li { list-style-type: none; }
</style>
...
<ul>
<li>(1) foo
<li>(2) bar
</ul>
--
Jukka Korpela, senior adviser
TIEKE Finnish Information Society Development Centre
http://www.tieke.fi/
Diffuse Business Guide to Web Accessibility and Design for All:
http://www.diffuse.org/accessibility.html
----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/
- Next message: Ian.Lloyd@nationwide.co.uk: "RE: Comments on a checklist requested"
- Previous message: Emma Jane Hogbin: "Re: FW: Formatting lists"
- Next message in Thread: Glenda Watson Hyatt: "RE: Formatting lists "
- Previous message in Thread: None
- View all messages in this Thread