Please take a second out to visit our sponsors. Thanks.

Home / Web Building Tutorials / Techniques for embedding a document inside another Part 2- The <layer> tag/ Page 2

 

 

WA Help Forum
Having trouble with anything? Visit our help forum to get the answers you need.

Jump to...
-Tutorial Index
-JavaScript Tutorials
-Free JavaScripts
-Free Java Applets
-Frontpage Tutorials

Low cost, high quality web hosting!
Click here for low cost, high quality web hosting!

Link to us!
We always welcome and appreciate links back to Website Abstraction. Click here for details.

 


Techniques for embedding a document inside another Part 2- The <layer> tag NS 4+

Red_CurlyC035.gif (995 bytes) The complimentary <ilayer> tag

Assuming you've tried using the <layer> tag and it's src property, you should have noticed that the external document floats above the rest of the page, overlapping any content beneath it, as anything inside a layer should do. That's a problem, unless you don't mind your surfers not being able to see half of the page! Here's where the <ilayer> tag comes in. A sibling of the <layer> tag, the <ilayer> tag is used when you wish a layer to be positioned inline with the rest of the content. By wrapping the <layer> tag inside <ilayer>, the content inside of it is brought back to earth, inline with everything else. In most circumstances, you'll want to embed a document inside another in NS 4 using both the <layer> tag and the <ilayer> tag. "Ok, just show me an actual example already!" you yell. Sure thing. Take a look at the below code:

<ilayer><layer src="external.htm"></layer></ilayer>

What you see above is "external.htm", embedded inside this document!

Red_CurlyC035.gif (995 bytes) Conclusion

The technique I've shown you in this tutorial for embedding a document is far from perfect. Depending on which version of NS 4 you have, you may notice different bugs occurring when using this technique (such as the page appearing "messed" up etc). However, this is currently the only way in NS 4 to add a document to another, so being picky isn't an option here. Next week, in the final part of this three-part tutorial, I'll show you a browser-independent, server side technique to embedding a document-by using SSI. It is the perfect way to embed a document, assuming your server supports this feature...stay tuned!


End Of Tutorial

http://www.wsabstract.com
CopyRight © 1997, 1998 Website Abstraction. NO PART may be reproduced without author's permission.