Skip Knox wrote:
> >In theory you could do this with generated content (that's what it is
> >there for, primarily),
>
>I did not see in the specs where one could control the punctuation,
>even on generated content.
It is in the spec, but the spec is hard to read sometimes. Note the
grouping under the content property. [1] Do you see the "+" after
the brackets? That means anything in the grouping can appear more
than once. So this set of statements:
ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}
acting on this markup:
<ol>
<li>list item one</li>
<li>list item two</li>
<li>list item three</li>
</ol>
Would get you this, in a compliant browser:
(a) list item one
(b) list item two
(c) list item three
> >I would regard the numbering as essential information and
> >just hardcode it into the HTML, setting the list-style-type to
> >none.
>
>Trouble with that is that the text isn't indented properly. It's
>going to come out underneath the numeral or letter, as it does with
>list-style-position: inside -- which is not acceptable to the
>custodians of the policy manual.
That is the purpose of a hanging indent. Read the spec section on
text-indent [2] and experiment with negative values. I generally
like the look of -1em, but you can use whatever value you like. Be
aware that the negative indent will move the (hardcoded) counter out
of the normal block box. You may have to tweak some margin/padding
values on the list and list items to make all browsers display the same.
>Thanks for thinking about it, though.
You're welcome.
1. <http://www.w3.org/TR/CSS21/generate.html#content>
2. <http://www.w3.org/TR/CSS21/text.html#indentation-prop>
-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/