to home page

BWRS
SEARCH

HOMETUTORIALSLINKSFORUMGLOSSARYNEWS
 
<iframe> 
Free music!
advertisement

<iframe> tags

This another tag that you wished that all browsers could use. Sadlyeven though it is part of W3C HTML v4 standard only internet explorer uses it

We've already seen how frames work, well <iframe> allow you to place a frame within a document like so

Note don't hit the the stop button or you'll close this window down !!!!

Just select the area you want to put your frame in and insert the folowing code

<iframe src="target.htm"
width="200" and height="200" name="inline">
</iframe>

That's essentially it

You must specify the URL of the page to appear in the frame
(here "target.htm") and most importantly enter a width and height value in pixels or % of window size. You can specify a name
(here "inline")

All the standard frame attributes work (marginheight, marginwidth, scrolling, frameborder or noresize - see our frames page for more). In addition as the frame can appear in the middle of text, the align attibute can be used like you would for an image and the vspace and hspace attributes can be use to put space around it

So how do you do it to work on browsers

you could use some complicated JavaScript..... but we've an easier solution

Lets use multiple frames

What you need to do is set a frame set like so

header.htm

leftmargin
.htm


iframe.htm

rightmargin
.htm

footer.htm



Click here
to see this in action

We've used a nestled frame set like this to create the effect

<frameset rows="150,200,*">
<frame src="header.htm" name="header"
border="0" frameborder="no" frameborder="0">
<frameset cols="150,200,*">
<frame src="leftmargin.htm" name="leftmargin"
border="0" frameborder="no" frameborder="0">
<frame src="iframe.htm" name="iframe">
<frame src="rightframe.htm" name="rightframer"
border="0" frameborder="no" frameborder="0">
</frameset>
<frame src="footer.htm" name="footer"
border="0" frameborder="no" frameborder="0">
</frameset>

To make the page appear seemless we've blanked all but the "iframe" frame borders out.

The only problem is that there may be some problems in rendering the frame in other sized windows

Back to Browser Specific main
BACK TO BROWSER SPECIFIC MAIN