Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could potentially use:</p> <pre><code>li:nth-child(6) { /* to hide the original text */ color: transparent; } li:nth-child(6)::before { content: 'Further back'; color: #000; } </code></pre> <p><a href="http://jsfiddle.net/davidThomas/BVvYU/" rel="nofollow">JS Fiddle demo</a>.</p> <p>But CSS can't <em>change</em> the actual text, as such; it can show this text (but it won't be in the DOM, or accessible to JavaScript, or for selection/interaction by the user).</p> <p>If the original text is wrapped in its own node, for example a <code>span</code>, such as:</p> <pre><code>&lt;ul&gt; &lt;li&gt;One&lt;/li&gt; &lt;li&gt;Two&lt;/li&gt; &lt;li&gt;Three&lt;/li&gt; &lt;li&gt;Four&lt;/li&gt; &lt;li&gt;Five&lt;/li&gt; &lt;li&gt;&lt;span&gt;Six&lt;/span&gt;&lt;/li&gt; &lt;li&gt;Seven&lt;/li&gt; &lt;li&gt;Eight&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Then that can be hidden with the following:</p> <pre><code>li:nth-child(6) span { display: none; } li:nth-child(6)::before { content: 'Further back'; color: #000; } </code></pre> <p><a href="http://jsfiddle.net/davidThomas/BVvYU/1/" rel="nofollow">JS Fiddle demo</a>.</p> <p>As mentioned in the comments, I should explain the use of the double-colon <code>::</code>, as opposed to the single-colon <code>:</code>, prefix. In CSS the two are used to distinguish between pseudo-elements (<code>::before</code>, <code>::first-line</code>, <code>::first-letter</code>) and pseudo-classes <code>:first-child</code>, <code>:hover</code>, etc). Under Internet Explorer, which only began to understand/implement pseudo-elements in version 8, <em>only</em> supports the use of the single-colon selector (while most other, more modern, browsers support both versions), so it's usually best to bite the bullet and either use: <code>:before</code>/<code>:after</code> (etc), <em>or</em> use both: <code>::before, :before {/* css */}</code>.</p> <p>References:</p> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes" rel="nofollow">CSS pseudo-classes</a>.</li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements" rel="nofollow">CSS pseudo-elements</a>.</li> </ul>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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