text-overflow

  • Revision slug: CSS/text-overflow
  • Revision title: text-overflow
  • Revision id: 292331
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The text-overflow CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('', U+2026 Horizontal Ellipsis) or a Web author-defined string.

text-overflow.png

Clipping happens at the border of the box; to clip at the character limit an empty custom string can be used ('').

This CSS property doesn't force an overflow to occur; to do so and make text-overflow to be applied, the author must apply some additional properties on the element, like setting {{ cssxref("overflow") }} to hidden.

  • {{ xref_cssinitial() }}: clip
  • Applies to : all block elements
  • {{ xref_cssinherited() }}: no
  • Media : {{ xref_cssvisual() }}
  • {{ xref_csscomputed() }}: the specified one.

Syntax

text-overflow: inherit                                 or
text-overflow: end-overflow-type                       or
text-overflow: left-overflow-type right-overflow-type      /* This syntax is still experimental and may be pushed to CSS4 */

where :

inherit
Is a keyword indicating to use the value of this CSS property that the parent element of the element uses.
end-overflow-type
Is an <overflow-type> CSS value describing the overflow to perform at the end of the line. The end of the line is its right end if the text is written with left-to-right directionality, it is its left end if the text is written with right-to-left directionality.
left-overflow-type
Is an <overflow-type> CSS value describing the overflow to perform at the left end of the line. The directionality of the text has no influence on which end of the line is affected.
right-overflow-type
Is an <overflow-type> CSS value describing the overflow to perform at the right end of the line. The directionality of the text has no influence on which end of the line is affected.

<overflow-type>

The <overflow-type> CSS type describes how text overflow, when not visible, must be handled. The following values are valid:

clip
This keyword value indicates to truncate the text at the limit of the content area, therefore the truncation can happen in the middle of a character. To truncate at the transition between two characters, the empty string value ('') must be used. The value clip is the default for this property.
ellipsis
This keyword value indicates to display ellipses ('…', U+2026 Horizontal Ellipsis) to represent clipped text. The ellipsis is displayed inside the content area, shortening more the size of the displayed text. If there is not enough place to display ellipsis, they are clipped.
string {{ experimental_inline() }}
The {{ xref_cssstring() }} to be used to represent clipped text. The string is displayed inside the content area, shortening more the size of the displayed text. If there is not enough place to display the string itself, it is clipped.

Examples

p {
  white-space: nowrap;
  width: 100%;                   
  overflow: hidden;              /* "overflow" value must be different from "visible" */ 

  text-overflow:    ellipsis;
}
CSS value direction: ltr direction: rtl
Expected Result Live result Expected Result Live result
visible overflow 1234567890
1234567890
0987654321
1234567890
text-overflow: clip t-o_clip.png
123456
t-o_clip_rtl.png
1234567890
text-overflow: '' 12345
123456
54321
1234567890
text-overflow: ellipsis 1234…
1234567890
…4321
1234567890
text-overflow: '.' 1234.
1234567890
.4321
1234567890
text-overflow: clip clip 123456
1234567890
654321
1234567890
text-overflow: clip ellipsis 1234…
1234567890
6543…
1234567890
text-overflow: clip '.' 1234.
1234567890
6543.
1234567890
text-overflow: ellipsis clip …3456
1234567890
…4321
1234567890
text-overflow: ellipsis ellipsis …34…
1234567890
…43…
1234567890
text-overflow: ellipsis '.' …34.
1234567890
…43.
1234567890
text-overflow: ',' clip ,3456
1234567890
,4321
1234567890
text-overflow: ',' ellipsis ,34…
1234567890
,43…
1234567890
text-overflow: ',' '.' ,34.
1234567890
,53.
1234567890

Specifications

Specification Status Comment
CSS Basic User Interface Level 3 {{ Spec2('CSS3 UI') }}  

A previous version of this interface reached the Candidate Recommendation status. As some not-listed-at-risk features needed to be removed, the spec was demoted to the Working Draft level, explaining why browsers implemented this property unprefixed, though not at the CR state.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 (312.3) {{ CompatGeckoDesktop("7.0") }}({{ anch("Gecko notes", "See notes") }}) 6.0 ({{ anch("Internet Explorer notes", "See notes") }}) 11 ({{ anch("Opera notes", "See notes") }}) 1.3 (312.3)
Two-value syntax {{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoDesktop("9.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
String value{{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoDesktop("9.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatVersionUnknown() }} {{ CompatGeckoMobile("7.0") }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}
Two-value syntax {{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoMobile("9.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
String value {{ experimental_inline() }} {{ CompatNo() }} {{ CompatGeckoMobile("9.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

Gecko notes

Starting in Gecko 10.0 {{ geckoRelease("10.0") }}, handling of text-overflow on blocks with inline overflow on both horizontal sides has been corrected; previously, if you specified only one value (such as text-overflow:ellipsis;), ellipsing was happening on both sides instead of just the end edge based on the block's text direction.

Internet Explorer notes

Internet Explorer 8 introduced the prefixed version, -ms-text-overflow, synonymous with text-overflow.

Opera notes

Opera has supported the prefixed version, -o-text-overflow, from version 9.0 on.

See also

  • CSS Reference index
  • Related CSS properties: {{ cssxref("overflow") }}, {{ cssxref("white-space") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>text-overflow</code> <a href="/en/CSS" title="CSS">CSS</a> property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('<code>…</code>', <code style="text-transform:uppercase">U+2026 Horizontal Ellipsis</code>) or a Web author-defined string.</p>
<p><img alt="text-overflow.png" class="internal default" src="/@api/deki/files/5846/=text-overflow.png" style=""></p>
<p>Clipping happens at the border of the box; to clip at the character limit an empty custom string can be used (<code>''</code>).</p>
<p>This CSS property doesn't force an overflow to occur; to do so and make <code>text-overflow</code> to be applied, the author must apply some additional properties on the element, like setting {{ cssxref("overflow") }} to <code>hidden</code>.</p>
<ul class="cssprop">
  <li><dfn>{{ xref_cssinitial() }}:</dfn> <code>clip</code></li>
  <li><dfn>Applies to :</dfn> all block elements</li>
  <li><dfn>{{ xref_cssinherited() }}:</dfn> no</li>
  <li><dfn>Media :</dfn> {{ xref_cssvisual() }}</li>
  <li><dfn>{{ xref_csscomputed() }}:</dfn> the specified one.</li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre class="eval">text-overflow: inherit                                 <em>or</em>
text-overflow: <em>end-overflow-type              </em><code>         <em>or</em></code>
<em><code>text-overflow: </code></em><code><em>left-overflow-type<code> </code>right-overflow-type</em></code>      /* This syntax is still experimental and may be pushed to CSS4 */
</pre>
<p>where :</p>
<dl>
  <dt style="margin-left: 40px;">
    <code>inherit</code></dt>
  <dd style="margin-left: 80px;">
    Is a keyword indicating to use the value of this CSS property that the parent element of the element uses.</dd>
  <dt style="margin-left: 40px;">
    <em>end-overflow-type</em></dt>
  <dd style="margin-left: 80px;">
    Is an <a href="/en/CSS/text-overflow#.3Coverflow-type.3E" title="en/CSS/text-overflow#.3Coverflow-type.3E"><code>&lt;overflow-type&gt;</code></a> CSS value describing the overflow to perform at the end of the line. The end of the line is its <em>right</em> end if the text is written with <em>left-to-right</em> directionality, it is its <em>left</em> end if the text is written with <em>right-to-left</em> directionality.</dd>
  <dt style="margin-left: 40px;">
    <em>left-overflow-type</em></dt>
  <dd style="margin-left: 80px;">
    Is an <a href="/en/CSS/text-overflow#.3Coverflow-type.3E" title="en/CSS/text-overflow#.3Coverflow-type.3E"><code>&lt;overflow-type&gt;</code></a> CSS value describing the overflow to perform at the <em>left</em> end of the line. The directionality of the text has no influence on which end of the line is affected.</dd>
  <dt style="margin-left: 40px;">
    <em>right-overflow-type</em></dt>
  <dd style="margin-left: 80px;">
    Is an <a href="/en/CSS/text-overflow#.3Coverflow-type.3E" title="en/CSS/text-overflow#.3Coverflow-type.3E"><code>&lt;overflow-type&gt;</code></a> CSS value describing the overflow to perform at the <em>right</em> end of the line. The directionality of the text has no influence on which end of the line is affected.</dd>
</dl>
<h3 id="&lt;overflow-type>"><code>&lt;overflow-type&gt;</code></h3>
<p>The <code>&lt;overflow-type&gt;</code> CSS type describes how text overflow, when not visible, must be handled. The following values are valid:</p>
<dl>
  <dt style="margin-left: 40px;">
    <code>clip</code></dt>
  <dd style="margin-left: 80px;">
    This keyword value indicates to truncate the text at the limit of the <a href="/en/CSS/box_model" title="en/CSS/Box_model">content area</a>, therefore the truncation can happen in the middle of a character. To truncate at the transition between two characters, the empty string value (<code>''</code>) must be used. The value <code>clip</code> is the default for this property.</dd>
  <dt style="margin-left: 40px;">
    <code>ellipsis</code></dt>
  <dd style="margin-left: 80px;">
    This keyword value indicates to display ellipses (<code>'…'</code>, <code style="text-transform:uppercase">U+2026 Horizontal Ellipsis</code>) to represent clipped text. The ellipsis is displayed inside the <a href="/en/CSS/box_model" title="en/CSS/Box_model">content area</a>, shortening more the size of the displayed text. If there is not enough place to display ellipsis, they are clipped.</dd>
  <dt style="margin-left: 40px;">
    <em>string {{ experimental_inline() }}</em></dt>
  <dd style="margin-left: 80px;">
    The {{ xref_cssstring() }} to be used to represent clipped text. The string is displayed inside the <a href="/en/CSS/box_model" title="en/CSS/Box_model">content area</a>, shortening more the size of the displayed text. If there is not enough place to display the string itself, it is clipped.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: css">p {
  white-space: nowrap;
  width: 100%;                   
  overflow: hidden;              /* "overflow" value must be different from "visible" */ 

  text-overflow:    ellipsis;
}
</pre>
<table class="standard-table">
  <thead>
    <tr>
      <th colspan="1" rowspan="2" scope="col">CSS value</th>
      <th colspan="2" rowspan="1" scope="col" style="text-align:center;"><code>direction: ltr</code></th>
      <th colspan="2" rowspan="1" scope="col" style="text-align:center;"><code>direction: rtl</code></th>
    </tr>
    <tr>
      <th scope="col">Expected Result</th>
      <th scope="col">Live result</th>
      <th scope="col">Expected Result</th>
      <th scope="col">Live result</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><em>visible overflow</em></td>
      <td style="font-family:monospace;">1234567890</td>
      <td style="direction:ltr;">
        <div style="float:left;font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:visible;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">0987654321</td>
      <td>
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:visible">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: clip</code></td>
      <td style="padding:1px;font-family:monospace;"><img alt="t-o_clip.png" class="internal default" src="/@api/deki/files/6056/=t-o_clip.png" style=""></td>
      <td style="direction:ltr;">
        <div style="float:left;font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip;">
          123456</div>
      </td>
      <td style="padding:1px;font-family:monospace;"><img alt="t-o_clip_rtl.png" class="internal default" src="/@api/deki/files/6057/=t-o_clip_rtl.png" style=""></td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ''</code></td>
      <td style="font-family:monospace;">12345</td>
      <td style="direction:ltr;">
        <div style="float:left;font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:'';">
          123456</div>
      </td>
      <td style="font-family:monospace;">54321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:'';">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ellipsis</code></td>
      <td style="font-family:monospace;">1234…</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">…4321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: '.'</code></td>
      <td style="font-family:monospace;">1234.</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:'.';">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">.4321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:'.';">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: clip clip</code></td>
      <td style="font-family:monospace;">123456</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip clip;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">654321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip clip;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: clip ellipsis</code></td>
      <td style="font-family:monospace;">1234…</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">6543…</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: clip '.'</code></td>
      <td style="font-family:monospace;">1234.</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip '.';">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">6543.</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:clip '.';">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ellipsis clip</code></td>
      <td style="font-family:monospace;">…3456</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis clip;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">…4321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis clip;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ellipsis ellipsis</code></td>
      <td style="font-family:monospace;">…34…</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">…43…</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ellipsis '.'</code></td>
      <td style="font-family:monospace;">…34.</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis '.';">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">…43.</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:ellipsis '.';">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ',' clip</code></td>
      <td style="font-family:monospace;">,3456</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:',' clip;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">,4321</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:',' clip;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ',' ellipsis</code></td>
      <td style="font-family:monospace;">,34…</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:','ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">,43…</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:','ellipsis;">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
    <tr>
      <td><code>text-overflow: ',' '.'</code></td>
      <td style="font-family:monospace;">,34.</td>
      <td style="direction:ltr;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:',' '.';">
          <span style="unicode-bidi:bidi-override;direction:ltr;margin:0 -2px">1234567890</span></div>
      </td>
      <td style="font-family:monospace;">,53.</td>
      <td style="direction:rtl;">
        <div style="font-family:monospace;white-space:nowrap;max-width:3.35em;overflow:hidden;text-overflow:',' '.';">
          <span style="unicode-bidi:bidi-override;direction:rtl;margin:0 -2px">1234567890</span></div>
      </td>
    </tr>
  </tbody>
</table>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="external" href="http://dev.w3.org/csswg/css3-ui/#text-overflow" title="http://dev.w3.org/csswg/css3-ui/#text-overflow">CSS Basic User Interface Level 3</a></td>
      <td>{{ Spec2('CSS3 UI') }}</td>
      <td> </td>
    </tr>
  </tbody>
</table>
<p>A previous version of this interface reached the <em>Candidate Recommendation</em> status. As some not-listed-at-risk features needed to be removed, the spec was demoted to the <em>Working Draft</em> level, explaining why browsers implemented this property unprefixed, though not at the CR state.</p>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0 (312.3)</td>
        <td>{{ CompatGeckoDesktop("7.0") }}({{ anch("Gecko notes", "See notes") }})</td>
        <td>6.0 ({{ anch("Internet Explorer notes", "See notes") }})</td>
        <td>11 ({{ anch("Opera notes", "See notes") }})</td>
        <td>1.3 (312.3)</td>
      </tr>
      <tr>
        <td>Two-value syntax {{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("9.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td>String value{{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("9.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatGeckoMobile("7.0") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
      </tr>
      <tr>
        <td>Two-value syntax {{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoMobile("9.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td>String value {{ experimental_inline() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoMobile("9.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h3 id="Gecko_notes">Gecko notes</h3>
<p>Starting in Gecko 10.0 {{ geckoRelease("10.0") }}, handling of text-overflow on blocks with inline overflow on both horizontal sides has been corrected; previously, if you specified only one value (such as <code>text-overflow:ellipsis;</code>), ellipsing was happening on both sides instead of just the end edge based on the block's text direction.</p>
<h3 id="Internet_Explorer_notes">Internet Explorer notes</h3>
<p>Internet Explorer 8 introduced the prefixed version, <code>-ms-text-overflow</code>, synonymous with <code>text-overflow</code>.</p>
<h3 id="Opera_notes">Opera notes</h3>
<p>Opera has supported the prefixed version, <code>-o-text-overflow</code>, from version 9.0 on.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en/CSS/CSS_Reference" title="CSS Reference">CSS Reference</a> index</li>
  <li>Related CSS properties: {{ cssxref("overflow") }}, {{ cssxref("white-space") }}</li>
</ul>
Revert to this revision