 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 34650 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 * Many say this antivirus is much better than the leading AV in the market. The least I can say is that AVG performs extremely well and its price (free) is simply unbeatable. If you don’t have an antivirus right now or are not pleased with your current level of protection, you should give this one a try. Web design, web development, technical communication, and IT made simple for both professionals and non-geeks. http://www.christopherjason.com |