So here's my problem: I have a wrapper div that's relatively positioned. Inside of this wrapper div I have two absolutely positioned divs: a nav bar and a content area. Both of these div's have fixed widths, but not a fixed height. After this wrapper div, I'm trying to put a normal div: the footer. Problem is, when I do this, the footer gets put where the wrapper starts, under the absolute divs.
Thanks in advance
EDIT: here's a simple code to demonstrate what I'm talking about:
Question
MBarvian
Hi all,
So here's my problem: I have a wrapper div that's relatively positioned. Inside of this wrapper div I have two absolutely positioned divs: a nav bar and a content area. Both of these div's have fixed widths, but not a fixed height. After this wrapper div, I'm trying to put a normal div: the footer. Problem is, when I do this, the footer gets put where the wrapper starts, under the absolute divs.
Thanks in advance
EDIT: here's a simple code to demonstrate what I'm talking about:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div style="position:relative; width:800px; background:red;"> <div style="position:absolute; width:200px; top:0; left:0; background:blue;">text here</div> <div style="position:absolute; width:600px; top:0; right:0; background:green;">and text here!</div> </div> <div style="width:800px;"> why isn't this working? </div> </body> </html>Link to comment
Share on other sites
12 answers to this question
Recommended Posts