 IFRAMEs are very useful for embedding content into a web page, particularly another URL. They are often misused for their box functionality and scrollbars. CSS has a property that allows for better control and a more reliable use: Overflow.
An IFRAME lets you embed a page into another one creating a box or frame within your page; like this:
<iframe height="250" width="250" src="http://www.google.com">
Your browser can't display IFRAMEs
</iframe>
If you want to present content in a similar fashion, that is, within a box with scrollbars, you can use a block element (a DIV for this example) and style it with CSS Overflow:
<div style="width:250px; height:250px; overflow:scroll">
Test content. This is a block element, in this case a DIV,
styled to have specific width and height,
and also features overflow control.
</div>
Overflow supports the following values:
visible
If there is content exceeding the box’s size, it will flow out of the box
Test content. This is a block element, in this case a DIV,
styled to have specific width and height,
and also features overflow control.
hidden
If there is content exceeding the box’s size, it will be hidden
Test content. This is a block element, in this case a DIV,
styled to have specific width and height,
and also features overflow control.
scroll
Force display of horizontal and vertical scrollbars
Test content. This is a block element, in this case a DIV,
styled to have specific width and height,
and also features overflow control.
auto
Show scrollbars if necessary (either horizontal, vertical or both)
Test content. This is a block element, in this case a DIV,
styled to have specific width and height,
and also features overflow control.
Author : Esopo, Read 34948 times, Comments: 1| Rating : |           | | Thursday, 9. June 2005 |
Add new comment/Comments
Your rating : Poor     Excellent |
  Do you have something to say? Then say it! NetBulge.com is devoted to web development. We are always looking for fresh and relevant ideas. If you are a web designer with a voice, this is the place to make it heard.
Join us!
  Featured * Need I say anything? - The best browser out there, period. A well designed efficient interface is only the beginning here; web safety and a truck load of good extensions are the turning point. If you haven’t tried it yet, you are seriously missing out. If you are a coder and were not aware of this site, you have been seriously missing out. At Hotscripts.com you will find a very extensive collection of all sorts of scripts that will ease the work load, serve as a starting point for a new script, or simply serve as an inspiration source for good code programming. http://www.hotscripts.com/ |