View Full Version : Positioning IFrames??


HollyAmethyst
01-31-2003, 09:51 PM
I've been trying to get 2 iframes, side by side, on top of a picture here ---> http://madness.serpensortia.net/topper.html kind of like this site has ---> http://www.supahstarr.net/main.html but it keeps going wrong >_< The code I'm using is:

<html>
<head><title>...</title>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor="#000000">
<center>
<table border=0>
<tr>
<td>
<img src='topper.png' border=0>
</td>
</tr>
</table>
<center><div style="position: absolute; top:308; width="550" height="200">
<iframe><iframe src="home.html" name="iframe2" width="500" height="200" style="position:absolute; top:308px; frameborder=0 border=0 scrolling=yes></iframe><iframe><iframe src="home.html" name="iframe3" width="50" height="200" style="position:absolute; top:308px; frameborder=0 border=0 scrolling=no></iframe></center>
</body>
</html>

I'm trying to use DIV, but what's wrong in my code? Help!

Celeris
01-31-2003, 10:14 PM
<html>
<head><title>...</title>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor="#000000">
<center>
<table border=0>
<tr>
<td>
<img src='topper.png' border=0>
</td>
</tr>
</table>
<center><div style="position: absolute; top:308; width="550" height="200">
<iframe><iframe src="home.html" name="iframe2" width="500" height="200" style="position:absolute; top:308px; frameborder=0 border=0 scrolling=yes></iframe><iframe><iframe src="home.html" name="iframe3" width="50" height="200" style="position:absolute; top:308px; frameborder=0 border=0 scrolling=no></iframe></center>
</body>
</html>

The above is your code. Below is my version of it... Since you have a STYLE tag on the iframe, the absolute positioning will basically create a secondary DIV for you, meaning that you should delete your DIV tags. You might also want to remove the CENTER tags, since you're using absolute positioning. Here is what the code should look like:

<html>
<head><title>...</title>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor="#000000">
<center>
<table border=0>
<tr>
<td>
<img src='topper.png' border=0>
</td>
</tr>
</table>
<iframe><iframe src="home.html" name="iframe2" width="500" height="200" style="position:absolute; top:308px; frameborder=0 border=0></iframe><iframe><iframe src="home.html" name="iframe3" width="50" height="200" style="position:absolute; top:308px; frameborder=0 border=0 scrolling=no></iframe>
</body></html>