Click to skip over navigation
 

lecture 10: inline frames

<< previous slide

return to lesson 10 index

next slide >>


Inline frames, in a lot of ways, are similar to ordinary frames, although they are rendered in a completely different way. Once again, the best way to illustrate is by example, so have a look at this updated version of the "Mondrian" page which will open in the second browser window.

Rather than the window being partitioned, as in ordinary frames, what you have here is a window-within-a-window. This is done with a tag, <iframe>, which can be placed in a standard HTML file - there is no need for separate frameset documents here. Basically, this is the same old Mondrian page (laid out using a table), but that central cell now contains the following code (which is also on your handout, along with some explanatory notes):

<iframe width="100%" height="200" src="mondrian1.html" scrolling="auto" frameborder="0" name="mond" marginwidth="100" marginheight="40">
Your browser is not configured to view inline frames. Please follow this link to a <a href="mondrian_text_only.html">text-only version of this site</a>.</iframe>

Note the text inside the <iframe> tag. This is the equivalent of <noframes> and again, should be considered obligatory.

Opening a new file within this window works in the same way as with ordinary frames - the "inner" window has a name (in this case, "mond") and the links in the "outer" window include the attribute, target="mond". (You can't make links in the inner window change the state of the outer window, though - although you could have more than one inline frame on a page, and one of these make changes in the other.) Also, you must still use target="_top" on any external links you might include in the inner window.

For an example of this on a real site, check out the Funeral for a Friend site.




<< previous slide

return to lesson 10 index

next slide >>