Forum Moderators: open

Message Too Old, No Replies

DIV and IFRAME...

are they uncompatible?

         

Nuriko

6:25 pm on May 12, 2004 (gmt 0)

10+ Year Member



Hi everyone!
I was using a DIV to write over an image, for a blogsite. I put the menù links in an iframe (out of the div)but text in the DIV disappeared (even if in html it was still there). I tryed and cancelled the IFRAME, and text returned. Wonder why this happens, are DIVs and IFRAMEs uncompatibles?

An other question about DIVs: are they supported by all browsers?

Nuriko

6:58 pm on May 12, 2004 (gmt 0)

10+ Year Member



I resolved my problem, I just put the menù links in an other DIV. However, does someone know why I had that problem?
thanks for helping!

DrDoc

7:07 pm on May 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, divs are supported by all browsers. Iframes are not.

You need to remember that elements cannot expand past the iframe border, since they are two separate documents. An element can only exist in one document at a time.
Divs do not have this restriction.

stef25

8:27 am on May 13, 2004 (gmt 0)

10+ Year Member



but is it possible to target a link into a div? i thought this was the main advantage of iframe over div

Nuriko

5:12 pm on May 13, 2004 (gmt 0)

10+ Year Member



Yes, even if iframe and div were in 2 different parts of the page (one on the top and the other on the bottom).. even so they had problems.
Target links into divs? I think it's impossible without frames/iframes... but I put an iframe into the second div and so it works!

DrDoc

5:20 pm on May 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, that is not possible.
Just remember -- iframes have no advantages whatsoever over regular frames, even though many seem to think they do.