/    Sign up×
Community /Pin to ProfileBookmark

Position DIV below another div with position:absolute

Here is an example of what is happening:

[code]<html>
<head>
<style type=”text/css”>
#left{
float:left;
}
#right{
float:right;
}
#main{
width:410px;
float:left;
}
#head{
width:792px;
}
body{
margin:0px;
}
#site{
background-color: #345679;
width:800px;
border: 2px solid black;
margin-top:5px;
position:absolute;
left: 50%;
margin-left: -400px;
}
#footer{
width:790px;
}
</style>
</head>
<body bgcolor=”#bac1cc”>
<center>
<div id=”site”>
<font color=”#000000″>
<div id=”head”>
</div>
<div id=”left”>Left Side
</div>
<div id=”right”>Right Side
</div>
<div id=”main”>
</div>
</font>
</div>
<div id=”footer”>
This is my footer
</div>
</center>
</body>
</html>
[/code]

If you run it you will notice that the footer div is at the top of the page behind the site div. Unfortunately I have to use position:absolute on the site div, but how can I make the footer div appear below the site div?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@curious_georgeauthorJan 29.2007 — Never mind, I came up with a solution.
Copy linkTweet thisAlerts:
@boutteJan 29.2007 — what did you do?
×

Success!

Help @curious_george spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...