![]() |
HTML code only works in Firefox & Opera
Challenge to anyone interested (please forgive the long explanation):
The code below is supposed to display looping images from 4 radar sites. Note that each site is centered within its own iframe. I assigned each image as a background to its respective iframe. Since each image is larger than the iframe that contains it, this allows me to center the image on each radar location within the smaller iframe. Now the problem! This code only works like it should (i.e. displaying looping images in each iframe) in the Firefox and Opera browsers. It won't work at all in IE. In Google Chrome, it only works correctly in the upper left iframe, and has trouble even loading the images in the other iframes. And in the Safari browser, although it is able to display all the radar images, it seems that only the upper left iframe loops consistently. Note that I have only worked with HTML 4.01, and I am hoping SOMEONE can figure out what I need to do to get this code to work correctly in IE, Google Chrome, and Safari browsers. I did run it through a CSE HTML Validator and it looked OK. Thanks much. Henry ____________________________________________________________ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta http-equiv="refresh" content="120"> </head> <body> <table width="940" border="0" cellpadding="0" cellspacing="0"> <caption align="center">Ft. Campbell, KY upper left, Old Hickory, TN upper right, Memphis, TN lower left, and Hytop, AL lower right)</caption> <tr> <td> <iframe width="466" height="386" align="left" style="background-image:url('http://radar.weather.gov/ridge/lite/N0R/HPX_loop.gif'); background-repeat:no-repeat; background-attachment:fixed; background-position:-56px -57px;"> </iframe> <iframe width="466" height="386" align="right" style="background-image:url('http://radar.weather.gov/ridge/lite/N0R/OHX_loop.gif'); background-repeat:no-repeat; background-attachment:fixed; background-position:410px -50px;"> </iframe> </td> </tr> <tr> <td> <iframe width="466" height="386" align="left" style="background-image:url('http://radar.weather.gov/ridge/lite/N0R/NQA_loop.gif'); background-repeat:no-repeat; background-attachment:fixed; background-position:-56px 335px;"> </iframe> <iframe width="466" height="386" align="right" style="background-image:url('http://radar.weather.gov/ridge/lite/N0R/HTX_loop.gif'); background-repeat:no-repeat; background-attachment:fixed; background-position:412px 335px;"> </iframe> </td> </tr> </table> </body> </html> |
You should be using div or img tags - not iframe to attach those images (div if they are irrelevant to the page and are just background decoration behind content and img if they are supposed to be part of the page content. Anyway as background it makes no difference whether the browser displays them or not.
|
Quote:
iframe element, which is supposed to be used to display content external to the current document.Quote:
Quote:
Code:
<!doctype html> |
Quote:
Seriously, I'm curious to how they're actually meant to be used. |
Quote:
|
I have never been used iframe before but if you used div in properly than it will be worked.
|
Quote:
|
Quote:
The only reason for still using an <iframe> tag now is IE7 which doesn't allow the border to be turned off if you do it properly using an <object> tag instead. All other browsers now support using the standard <object> tag for embedding one HTML inside another so that you no longer need to use the antiquated non-standard iframe tag for that purpose. |
Quote:
Quote:
iframe element should be used to display (third-party) HTML documents because that's the element designed for that purpose. |
| All times are GMT +1. The time now is 05:55 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.