Page 1 of 1

Using a DIV as an IFrame.

Posted: January 17, 2004, 3:05 pm
by Akaran_D
Is it possible?
Say I have a menu, nestled intoa graphic nestled into a table. Now, on this menu, I want to click somthing and have it open up in a DIV for the main content lower down on the page.

Is this possible, or do I need to bite the bullet and sweat out IFrames?

Re: Using a DIV as an IFrame.

Posted: January 18, 2004, 1:40 am
by archeiron
Akaran_D wrote:Is it possible?
Say I have a menu, nestled intoa graphic nestled into a table. Now, on this menu, I want to click somthing and have it open up in a DIV for the main content lower down on the page.

Is this possible, or do I need to bite the bullet and sweat out IFrames?
Please explain your question more clearly, but the answer is almost certainly yes. I just need to understand better what the fuck you are saying so that I can provide you with an example. ;)

Posted: January 18, 2004, 8:42 am
by Xatrei
Is this the sort of effect you're looking to use (the scrolling section containing the "meat" of the document)?

http://www.csszengarden.com/?cssfile=047%2F047%2Ecss

The DIV that contains the scrolling bit ("supportingText") is constrained to an area 375 pixels wide by 150 pixels high, and allowed to produce a scrollbar rather than being clipped with the following bit of CSS:

Code: Select all

#supportingText { 
	width: 375px;
	height: 150px;
	overflow: auto;
	padding: 0 20px 30px 5px;
	z-index: 10;
	border-left: solid 1px #999;
What I think you're asking is for a way to fill such an area with content when the user chooses a particular item on a menu. You could certainly do this by placing the different content into spearate DIVs and using a bit of javascript to toggle the various DIV's visibility property. For what you're looking to do, however, it sounds like you'll be better off using teh evil frames of doom.

A good, yet somewhat complicated, example of this sort of effect is a in the AA, Keys, Flags Skills, etc. buttons of a Magelo profile. Clicking on any of those links will fire a javascript event handler that toggles off the current DIV and toggles on the chosen DIV. The same sort of thing happens when you click an item icon within a profile to open the item detail box.

Posted: January 18, 2004, 10:54 am
by Akaran_D
Thanks Xag, that answers my question. :)