scrolling attribute (frame, iframe)
Sets whether a frame has scrollbars.
If you want to change one of the element's scrollbar state, use the overflow style property, or if you want to change the scrollbar state of the entire page (Internet Explorer), use the scroll attribute.
JavaScript page for this attribute: scrolling. You can find other example(s) there. |
Possible values:
String that sets the state of scrollbars.
One of the following values:
Default. Scrollbars are added only when necessary. | |||||||
Scrollbars are not added. | |||||||
Scrollbars are always added.
This value behaves differently in browsers:
|
Default: auto.
Example HTML code 1:
This example illustrates the use of the scrolling attribute. Note that the value of 'yes' behaves differently in browsers (see above). If you want that scrollbars will be always added to a frame, use the overflow style property. The next example demonstrates it.
|
|||||||
<head> <style> iframe { width:200px; height:150px; } </style> </head> <body> <iframe src="frameScroll1.htm" scrolling="yes"></iframe> <iframe src="frameNoScroll1.htm" scrolling="no"></iframe> </body> |
|||||||
|
|||||||
Did you find this example helpful?
|
Example HTML code 2:
This example shows how to add scrollbars to a frame in all commonly used browsers. It uses the overflow style property of the html element to implement it.
|
|||||||
<head> <style> iframe { width:200px; height:150px; } </style> </head> <body> <iframe src="frameScroll2.htm"></iframe> <iframe src="frameNoScroll2.htm"></iframe> </body> |
|||||||
|
|||||||
Did you find this example helpful?
|
Supported by tags:
Related pages:
External links:
User Contributed Comments