Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS styling a table of contents
    primarykey
    data
    text
    <p>I'm trying to replicate the following table of contents:</p> <p><img src="https://i.imgur.com/zLoBg9m.png" alt=""></p> <p>I've gotten pretty close with the following code: <a href="http://jsfiddle.net/33Kgn/2/" rel="nofollow noreferrer">http://jsfiddle.net/33Kgn/2/</a></p> <pre><code>.list li { position:relative; overflow:hidden; width:330px; } .list li:after { font-family: Times New Roman; font-size: 120%; content:"................."; text-indent: -1px; display:block; letter-spacing:34px; position:absolute; left:0px; bottom:0px; z-index:-1; font-weight:bold; } .list li span { display:inline-block; background-color:#FFF; padding-right:5px; } .list li .number { float:right; font-weight:bold; padding-left:5px; } &lt;div style="margin:25px 22px 200px 22px;"&gt; &lt;div style="text-align:center;font-size:150%;letter-spacing:.1em;margin-bottom:10px;margin-right:-.1em;"&gt;CONTENTS&lt;/div&gt; &lt;ul class="list" style="padding-left:180px;"&gt; &lt;li style="margin:0 0 .6em 0;"&gt;&lt;span&gt;EDITOR&amp;rsquo;S INTRODUCTION&lt;/span&gt;&lt;span class="number"&gt;ix&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;1. Historical&lt;/span&gt;&lt;span class="number"&gt;ix&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;2. Epistemology&lt;/span&gt;&lt;span class="number"&gt;xii&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;3. Epistemology of Morals&lt;/span&gt;&lt;span class="number"&gt;xx&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;4. Psychology of Morals&lt;/span&gt;&lt;span class="number"&gt;xxvi&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;5. The Moral System&lt;/span&gt;&lt;span class="number"&gt;xxx&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 1.5em 0;"&gt;&lt;span style="padding-left:.6em;"&gt;6. Morals and Theology&lt;/span&gt;&lt;span class="number"&gt;xliii&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span&gt;A REVIEW OF THE PRINCIPAL QUESTIONS IN MORALS&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;/li&gt; &lt;li style="margin:0 0 .5em 0;"&gt;&lt;span&gt;INDEX&lt;/span&gt;&lt;span class="number"&gt;297&lt;/span&gt;&lt;/li&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>But as you can see if you follow the link, the "A REVIEW..." and "INDEX" part doesn't work. Any help would be appreciated.</p> <p>EDITED TO ADD: The difficulty here lies in the indentation and line-wrapping of "A REVIEW OF THE PRINCIPAL QUESTIONS IN MORALS". So this question does not yet have an answer.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload