On Thursday, September 23, 2010, 8:10:48 PM, Eric A. Meyer wrote:
> In theory you could do it with a combination of ::marker and CSS
> counters. In practice, nobody ever implemented ::marker. And I
> agree with the assertions made in the link from David H.'s post, that
> you want the numbering in the HTML source instead of auto-generated
> (at least for legal documents). [...]
---
Thanks for your help, guys. I've cracked the layout provided that (as
David suggested) I hard-code the paragraph numbering. My solution
"page paints" rather than uses proper semantics, and so goes against
most of what's instinctive to me as a technical writer! The trick
seems to be to use paragraphs rather than proper lists so that the
automatic numbering doesn't appear.
Only two styles are used:
span.num {
float: left;
margin-right: 1em;
}
span.text {
display: block;
overflow: hidden;
zoom: 1;
}
In the body:
<p><span class="num">1.</span>
<span class="text">Blah blah blah<br>
<span class="num">1.1</span>
<span class="text">Blah blah blah</span>
<span class="num">1.2</span>
<span class="text">Blah blah blah<br>
<span class="num">1.2.1</span>
<span class="text">Blah blah blah</span></span>
<span class="num">1.3</span></span></p>
<p><span class="num">2.</span>
<span class="text">Blah blah blah</span></p>
<!-- etc. -->
Note the line breaks each time a subordinate list is started and that
each subordinate list is enclosed in the "text" span of it's parent.
This left-aligns the numbering of sub-paragraphs with the body text of
their parents.
Thanks again,
--
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/