Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Iframe firefox vs. IE 1

Status
Not open for further replies.

mufka

ISP
Joined
Dec 18, 2000
Messages
587
Location
US
I've setup a page using iframes. It splits a portion of the screen into two. The left portion frames a page with just thumb links to images. The right frame is the target when you click the links. It works ok in IE, but in firefox, when you click the links, the images open in a new window. Also in firefox, the default page in the frame doesn't display.

Is there something simple that might cause this, or is there just a difference in how it works with the different browsers?
 
Code:
<iframe src="picnav.htm" width=25% height=100% border=0>
<iframe src="picintro.htm" width=75% height=100% name=showpic border=0>
</iframe>
</iframe>

The picintro.htm just instructs the user to click the links to the left and the pic will show up on the right.

The links in the picnav.htm look like
Code:
<a href=images/pic1.jpg target=showpic><img src=images/pic1.jpg width=100 border=0></a>

It works perfectly in IE.
 
Iframe will render the page referred in the src attribute within the space it has defined. For browsers that do not support iframes, the content that is between the opening and closing iframe tag will be displayed. If the browser successfully loads the iframe, then this code (between the opening and closing iframe tag) will be ignored. That is why you cannot nest iframes.

IE is cutting you some slack (very typical) and assumes you wanted to do something else. FF follows your commands and will render the inner iframe only if the browser cannot render the outer.

Put the two iframes one after another and float them to get the effect you're looking for. Or use regular frames. Or avoid any kind of frames to begin with.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top