Frame Scrolling Attribute in HTML

By default, the scrolling is set to auto which shows enable or show the scroll bars only if the contents of the page is larger than the size of the Web Page. The frame scrolling can be set to values “YES”, “NO” and “AUTO”.

<Frame src=”home.htm” scrolling=”YES”> means always enable and show the scroll bars even if the size of the contents are less than the Web Page which logically not requires scrolling.

<Frame src=”home.htm scrolling=”NO”> means always disable and not show the scroll bars even if the size of the contents are large than the Web Page which logically requried the scrolling to read the cotents.

<Frame scr=”home.htm scrolling”AUTO”> automatically detects whether scrolling is required for the Web Page or not.

 

HTML code to show how to  enable scrolling in frame

   1:  <html>
   2:  <frameset rows="50%,50%">
   3:  <frame src="cellpadding.htm" scrolling="YES" >
   4:  <frame src="cellspacing.htm" scrolling="YES">
   5:  </frameset>
   6:  </html>

image

HTM code to show how to disable scrolling in frame

   1:  <html>
   2:  <frameset rows="50%,50%">
   3:  <frame src="cellpadding.htm" scrolling="NO" >
   4:  <frame src="cellspacing.htm" scrolling="NO">
   5:  </frameset>
   6:  </html>

image

Default behavior of frames

   1:  <html>
   2:  <frameset rows="50%,50%">
   3:  <frame src="cellpadding.htm" scrolling="AUTO" >
   4:  <frame src="cellspacing.htm" scrolling="AUTO">
   5:  </frameset>
   6:  </html>

Tags: , , , ,

Author: Revo

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *

10 + 4 =

 

Pin It on Pinterest

Shares
Share This