PDA

View Full Version : multiple iframes ... OR div tags better?



deltatango5
27 Nov 2005, 04:07 PM
My goal is to have a simple navigation/menu at the top of the site, where depending on a selection from the navigation (in most cases by selection) the selection would pull up or "call up" a theme image in window A or IFRAME A, which resides side by side to window B or IFRAME B which will also populate at the same time with content to coincide with the theme image (IFRAME A).

Basically I want to encapsulate all the content with a certain sizing of the browser window ... IFRAME A would stay static and would not scroll in any direction so the theme image would stay resident and visible next to IFRAME B which may--or may not require vertical scrolling.

I certainly hope this makes sense and would welcome any thoughts, opinions, pointer and/or straight up code snippets--web sites for reference. As always thanks in advance for all/any help you can provide!

| nav link - nav link - nav link - nav link - nav link |

|-------------------| |------------------------------|

..........IFRAME A..........................IFRAME B

|-------------------| |------------------------------|


OR ... would somebody have suggestions as to how to accomplish this in similar fashion but with the use of DIV TAGS instead?

Rincewind
27 Nov 2005, 09:02 PM
Don't use frames or iframes. I say it over and over and over and ....

What you want is perfectly posible using div tags. The scrolling effect can be acheaved easilly by using the overflow:scroll or overflow:auto style in your css.

For example


<style type="text/css">
#header {
height:10%
}
#sectiona {
float:left;
width:30%;
height:90%;
overflow:auto;
}
#sectionb {
float:left;
width:70%;
height:90%;
overflow:auto;
}
</style>

<div id="header">
nav links however you want them
</div>

<div id="sectiona">
the content of section A
</div>

<div id="sectionb">
the content of section B
</div>