Forum Moderators: not2easy
--------- ----------
¦ Image ¦ ¦ iFrame ¦
--------- ----------
With no space in between the two.
I'm trying to put the iFrame inside a DIV set to float right, but I can't seem to get it to work right (iFrame always appears below the image).
Should I somehow nest this? If so, do I nest in a DIV or a P tag or something else?
Ultimately I also want to float the whole "block" (both elements together) to the right of the page...
Thanks,
TJ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title></title>
</head>
<body>
<div style="float:right;">
<p style="float:left;"><img src="image.gif" width="200" height="200" alt=""></p>
<iframe width="200" height="200" src="page.html"></iframe>
</div>
</body>
</html> It's only a rough first start, it will need a bit more testing to see why Opera doesn't like it...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title></title>
</head>
<body>
<div style="float:right;">
<p><img style="float:left;" src="image.gif" width="200" height="200" alt=""></p>
<iframe width="200" height="200" src="page.html"></iframe>
</div>
</body>
</html> It's only a rough first start, it will need a bit more testing to see why Opera doesn't like it...
The only Opera referrers I see these days are from someone in Austin, Texas. ;)
[edited by: pageoneresults at 12:14 pm (utc) on June 24, 2006]
Would a display:inline on the <iframe> do anything?
On the
iframe, no, but on the p yes! So we can simply remove the block element around the image: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title></title>
</head>
<body>
<div style="float:right;">
<img style="float:left;" src="image.gif" width="200" height="200" alt="">
<iframe width="200" height="200" src="page.html"></iframe>
</div>
</body>
</html> Seems to work. :)