Here's my problem, I want to position a <div> layer 50px below another, the problem is that I dont know how big the other will be. Is there a way of making the position of the new <div> relative to the position of the origional?
Announcement
Collapse
No announcement yet.
How can I position a <div> relative to another?
Collapse
X
-
Yes, ie.
PHP Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
#firstdiv { width: 500px; height: 200px; border: 1px solid #000; }
#seconddiv { width: 500px; height: 200px; border: 1px solid #000; margin-top: 50px; }
</style>
</head>
<body>
<div id="firstdiv"></div>
<div id="seconddiv"></div>
</body>
</html>
-
-
Comment