div positioning

Status
Not open for further replies.

kostas

In Runtime
Messages
398
Hello all, i'm trying to center two iframes on a page. First I tried using a table to insert the iframes and it worked on IE but not in Firefox so I figured I'd take the div route. But regardless of positioning, it doesnt work at all. Any ideas? Here's code of main page:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>main</title>
</style>
</head>
<body>
<div id="site" style="position: absolute; top:0; left:300; width:600; height:800;">
<div id="top" style="position: absolute; top:0; left:300; width:600; height:220;">
<iframe src="menu.html" frameborder="0" height="220" scrolling="no" width="600"></iframe></div>
<div id="bottom" style="position: absolute; top:220; left:300; width:600; height:580;">
<iframe src="menu.html" frameborder="0" height="580" scrolling="no" width="600"></iframe></div></div>
</body></html>
 
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>main</title>
</style>
</head>
<body>
<div id="site" style="position: absolute; top:0px; left:300px; width:600px; height:800px;">
<div id="top" style="position: absolute; top:0px; left:300px; width:600px; height:220px;">
<iframe src="menu.html" frameborder="0px" height="220px" scrolling="no" width="600px"></iframe></div>
<div id="bottom" style="position: absolute; top:220px; left:300px; width:600px; height:580px;">
<iframe src="menu.html" frameborder="0px" height="580px" scrolling="no" width="600px"></iframe></div></div>
</body></html>

Try that. You have to give a unit to the size, like px, or cm, etc.
 
Status
Not open for further replies.
Back
Top Bottom