div objects and iframe

P

PeP

hi,
the following code produces,
in ie for win and mozilla-based browsers for win/linux/mac,
the div object to be foreground respect to the iframe, because of z-index
css attribute,
but opera browser for win/linux and ie for mac always show the div object in
the
background

<div id="obj1" style="z-index: 2; position: absolute; top: 10px; left:
10px"> ... </div>
<iframe id="myframe" style="z-index: 1; position: absolute; top: 15px; left:
15px"> ... </iframe>

any suggestions?
 
D

Dylan Parry

Spake PeP unto thee:
what can i use instead? normal frames or other?
thank you

To achieve the effect you seem to be after, frames aren't the solution. Is
the content of the frame another page on your site or an external site?

If the former, then you could use a <div> and copy n' paste the content of
that file into the division, then apply an "overflow: auto" style to it.

This will have the effect of creating what appears to be an iframe with
scrollbars when necessary, and works in IE (4-6 Windows, but only 5 on
Mac), Mozilla (and NS versions that use Mozilla) and Opera (7). It
also works in Safari (AFAIK) but not in Konqueror.

This might fix the problem you are having, but I haven't tested it.
 
D

Dylan Parry

Spake Dylan Parry unto thee:
If the former, then you could use a <div> and copy n' paste the content
of that file into the division, then apply an "overflow: auto" style to
it.

Of course, you need to add dimensions to that division, otherwise it will
just default to take up all the space it needs. I also forgot to mention
that in the latter case you are out of luck ;)
 
P

PeP

To achieve the effect you seem to be after, frames aren't the solution. Is
the content of the frame another page on your site or an external site?

the content of the page is on the same website but id' like to change
the frame (or div) content dynamically, according to the user choices!

thank you
 
D

Dylan Parry

Spake PeP unto thee:
the content of the page is on the same website but id' like to change
the frame (or div) content dynamically, according to the user choices!

You could do this using a server-side language such as PHP, and have a
different file included depending on the user's choice...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top