Frames refer to elements that are used to divide a Web page into separate parts or portions. Dividing a Web page into frames enables you to display additional content or multiple documents in a single Web page. Earlier frames were created using the FRAME element provided by HTML, however this method has now become obsolete due to various reasons, such as problem in bookmarking the page or lack of proper support on Web browser. Nowadays, frames can be created using various properties of CSS.
For Example :
<!doctype html>
<head>
<DIV id="frame">This is a frame</DIV>
<STYLE type="text/css">
#frame{
position:absolute;
top:0px;
bottom:0px;
right:0;
width:100px;
height:100%;
background:white;
color:red;
}
</STYLE>
</head>
<body></body>
</html>
We have used a DIV element to be displayed as a frame in a Web page. We have also specified the position of a frame using the position, top, bottom, and right properties.
For Example :
<!doctype html>
<head>
<DIV id="frame">This is a frame</DIV>
<STYLE type="text/css">
#frame{
position:absolute;
top:0px;
bottom:0px;
right:0;
width:100px;
height:100%;
background:white;
color:red;
}
</STYLE>
</head>
<body></body>
</html>
We have used a DIV element to be displayed as a frame in a Web page. We have also specified the position of a frame using the position, top, bottom, and right properties.
No comments:
Post a Comment