mozilla

Revision 24530 of overflow-x

  • Revision slug: CSS/overflow-x
  • Revision title: overflow-x
  • Revision id: 24530
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 200 words added, 153 words removed

Revision Content

{{ CSSRef() }}

Summary

overflow-x specifies whether to clip content, render a scroll bar or display overflow content of a block-level element, when it overflows at the left and right edges. 

  • {{ Xref_cssinitial() }}: {{ Cssxref("visible") }}
  • Applies to: (non-replaced) block and inline-block elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: n/a
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: as specified, except ‘visible’

Syntax

overflow:  visible | hidden | scroll | auto

Values

visible
Content is not clipped, it may be rendered outside the content box.
hidden
The content is clipped and no scrollbars are provided.
scroll
The content is clipped and desktop browsers use scrollbars, whether or not any content is clipped. This avoids any problem with scrollbars appearing and disappearing in a dynamic environment. Printers may print overflowing content.
auto
Depends on the user agent. Desktop browsers like Firefox provide scrollbars if content overflows.

Mozilla Extensions

-moz-scrollbars-none
Obsolete Use overflow:hidden instead.
-moz-scrollbars-horizontal
Deprecated Use of overflow-x and overflow-y is preferred.
-moz-scrollbars-vertical
Deprecated Use of overflow-x and overflow-y is preferred.
-moz-hidden-unscrollable
Is intended mainly for internal use and by themes. Disables scrolling of XML root elements and <html>, <body> by arrow keys and mouse wheel.

Examples

{{ CSSRefExampleLink("PROPERTYNAME") }} {{ Fixeg() }}

[fixme]

Notes

 

Specifications

Browser compatibility

Browser Lowest Version
Internet Explorer 5.0 (*)
Firefox 1.5
Opera 9.5
Safari 3.0

(*) IE8 introduced -ms-overflow-x as a  synonym for overflow-x. Don't use the -ms- prefix.

See also

{{ Cssxref("overflow") }}, {{ Cssxref("overflow-y") }}

{{ languages( { "pl": "pl/Dokumentacja_CSS/W\u0142asno\u015bci_szablonu", "ko": "ko/CSS_Reference/Property_Template" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p><code>overflow-x </code>specifies whether to clip content, render a scroll bar or display overflow content of a block-level element, when it overflows at the left and right edges. </p>
<ul> <li>{{ Xref_cssinitial() }}: {{ Cssxref("visible") }}<span class="comment"><br> </span></li> <li>Applies to: (non-replaced) block and inline-block elements<span class="comment"><br> </span></li> <li>{{ Xref_cssinherited() }}: no</li> <li>Percentages: n/a</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: as specified, except ‘visible’</li>
</ul>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">overflow:  visible | hidden | scroll | auto
</pre>
<h3 name="Values">Values</h3>
<dl><dt>visible</dt><dd>Content is not clipped, it may be rendered outside the content box.</dd><dt>hidden</dt><dd>The content is clipped and no scrollbars are provided.</dd><dt>scroll</dt><dd>The content is clipped and desktop browsers use scrollbars, whether or not any content is clipped. This avoids any problem with scrollbars appearing and disappearing in a dynamic environment. Printers may print overflowing content.</dd><dt>auto</dt><dd>Depends on the user agent. Desktop browsers like Firefox provide scrollbars if content overflows.</dd></dl>
<h4>Mozilla Extensions</h4>
<dl><dt><span class="lang lang-en"><code><a href="../../../../en/CSS/-moz-scrollbars-none" rel="internal">-moz-scrollbars-none</a></code> </span></dt><dd><span class="lang lang-en"><span style="border: 1px solid rgb(255, 153, 153); background-color: rgb(255, 219, 219); font-size: x-small; vertical-align: text-top;">Obsolete</span></span> Use<code> overflow:hidden </code>instead.</dd><dt><span class="lang lang-en"><code><a href="../../../../en/CSS/-moz-scrollbars-horizontal" rel="internal">-moz-scrollbars-horizontal</a></code> </span></dt><dd><span class="lang lang-en"><span style="border: 1px solid rgb(152, 152, 240); background-color: rgb(221, 221, 255); font-size: x-small; vertical-align: text-top;">Deprecated</span></span> Use of <span class="lang lang-en"><code><a href="../../../../en/CSS/overflow-x" rel="internal">overflow-x</a></code> </span> and <span class="lang lang-en"><code><a href="../../../../en/CSS/overflow-y" rel="internal">overflow-y</a></code> </span> is preferred.</dd><dt><span class="lang lang-en"><code><a href="../../../../en/CSS/-moz-scrollbars-vertical" rel="internal">-moz-scrollbars-vertical</a></code> </span></dt><dd><span class="lang lang-en"><span style="border: 1px solid rgb(152, 152, 240); background-color: rgb(221, 221, 255); font-size: x-small; vertical-align: text-top;">Deprecated</span></span> Use of <span class="lang lang-en"><code><a href="../../../../en/CSS/overflow-x" rel="internal">overflow-x</a></code> </span> and <span class="lang lang-en"><code><a href="../../../../en/CSS/overflow-y" rel="internal">overflow-y</a></code> </span> is preferred.</dd><dt><span class="lang lang-en"><code><a href="../../../../en/CSS/-moz-hidden-unscrollable" rel="internal">-moz-hidden-unscrollable</a></code> </span></dt><dd>Is intended mainly for internal use and by themes. Disables scrolling of XML root elements<span style="font-family: monospace;"> and</span><code> &lt;html&gt;</code>,<code> &lt;body&gt; </code>by arrow keys and mouse wheel.</dd></dl>
<h3 name="Examples">Examples</h3>
<p>{{ CSSRefExampleLink("PROPERTYNAME") }} {{ Fixeg() }}</p>
<pre class="eval">[fixme]
</pre>
<h3 name="Notes">Notes<span class="comment"><br>
</span></h3>
<p> </p>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/css3-box/#overflow" title="http://www.w3.org/TR/css3-box/#overflow">CSS3 Box Model #overflow</a></li>
</ul>
<h3 name="Browser_compatibility">Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td>Internet Explorer</td> <td><strong>5.0</strong> (*)<strong><br> </strong></td> </tr> <tr> <td>Firefox</td> <td><strong>1.5</strong></td> </tr> <tr> <td>Opera</td> <td><strong>9.5</strong></td> </tr> <tr> <td>Safari</td> <td><strong>3.0</strong></td> </tr> </tbody>
</table>
<p>(*) IE8 introduced<code> -ms-overflow-x </code>as a  synonym for<code> overflow-x</code>. Don't use the <code>-ms-</code> prefix.</p>
<h3 name="See_also">See also</h3>
<p>{{ Cssxref("overflow") }}, {{ Cssxref("overflow-y") }}<span class="comment"><br>
</span></p>
<p>{{ languages( { "pl": "pl/Dokumentacja_CSS/W\u0142asno\u015bci_szablonu", "ko": "ko/CSS_Reference/Property_Template" } ) }}</p>
Revert to this revision