On Tue, 21 Feb 2012 10:33:45 -0500
> David Stone wrote:
>> Looking at
>>
http://www.w3.org/TR/CSS21/generate.html#propdef-list-style
>>
>> Is there a way to have a list styled lower-alpha, but with (a)
>> instead of the default a. presentation? In other words, something
>> that looks like this:
>>
>> The options are:
>> (a) Do this thing
>> (b) Do that thing
>> (c) Do something else
>> (d) Do nothing
>>
>> instead of
>>
>> The options are:
>> a. Do this thing
>> b. Do that thing
>> c. Do something else
>> d. Do nothing
>
>
> Counters*
>
> Note * No support in IE until version 8
Just a little more css would help it degrade over a few more versions without
loosing the item list.
Change to HTML5 or perhaps 4.01 transitional just to get validation for the
type attribute on the OL.
<!DOCTYPE html>
> <html>
add lang attribute to the opening html
<html lang="en">
> <head>
>
>
> <title>counters</title>
Just a little more css
<style type="text/css">
: lang(en) [class~='alpha_list'] > li {
list-style: none;
position: relative;
}
: lang(en) [class~='alpha_list'] > li:before {
content: "(" counter(item,lower-alpha) ")";
counter-increment: item;
position: absolute;
right: 100%;
top: 0.3em; /* li padding-top */
padding-right: 0.3em;
}
ol,ol li {
margin: 0;
padding: 0;
}
ol.alpha_list {
counter-reset: item;
margin: 0.5em;
}
ol.alpha_list li {
margin: 0.3em 0.3em 0.3em 2.5em;
padding: 0.3em;
}
</style>
> </head>
> <body>
>
>
> <ol class="alpha_list">
add type attribute to OL
<ol class="alpha_list" type="a">
> <li>Do this thing</li>
> <li>Do that thing</li>
> <li>Do something else</li>
> <li>Do nothing</li>
> </ol>
>
> </body>
> </html>
--
BootNic Wed Feb 22, 2012 12:11 am
"There is a wicked pretense that one has been informed. But no such thing has
truly occurred! A mere slogan, an empty litany. No arguments are heard, no
evidence is weighed. It isn't news at all, only a source of amusement for
idlers."
*Gibson-Sterling, The Difference Engine*