scrolling (HTML attribute)
| Depr. | Version |
|---|---|
| No | HTML 4.01 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Full | Full | Full | Full | Full |
Syntax
Description
In a frameset-based design, it’s often the case that one portion of the screen, for example aframe dedicated to navigation is a fixed height and the
content inside will not vary at all. As such, scroll bars are not normally
required, but some browsers may reserve space for scrollbars, just in case
the content scrolls (which it might do if the font size is increased). The
scrolling attribute is used to tell the browser
whether to allow scrollbars or not, regardless of the content that
appears.If no scrolling attribute is applied,
the default that browsers revert to is "auto", so there
is very little good reason for applying scrolling="auto"
within the frame; you are almost always going to use it for the purpose of
suppressing scroll bars, using the value of "no". If a
value of yes is applied, then the browser will
reserve space for the scrollbars regardless of whether the
content runs off the page. The various settings are shown in Figure 1.
Note that in the screenshot that when set to
"yes", the browser applies inactive scroll bars on the
x and y axis even though the content fits in the page. In the smaller
window with the value set to "no", the last line is
missing and you cannot use the scrollbars to reveal
it.
Example
The header frame will not cause scroll bars, while the main frame will force scroll bars to appear:
<frameset rows="100,*" >
<frame src="header.html" frameborder="1"
noresize="noresize" scrolling="no"/>
<frame src="home.html" frameborder="0" scrolling="yes"/>
</frameset>
Value
"yes",
"no" or "auto"
only
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full |
Every browser listed supports this attribute.
User-contributed notes
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.




