| | |
Problem with an absolute div
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 38
Reputation:
Solved Threads: 0
Okay so I'm building a site with a bit of an unusual and complex layout. It has a static header div of a fixed height. A body div of a variable height that must be positioned absolutely for overlapping. And I need there to be a footer directly below the absolute div. Here is the basic layout of the css/html
Basically, I have everything in the top portion of the document working properly. I just can't get my footer to work below my absolutely positioned element. I have tried wrapping div id body_contents in another div that is positioned statically and no marbles. Please help me get my footer to display in the right place.
HTML and CSS Syntax (Toggle Plain Text)
<style type="text/css"> #page_wrapper { width:800px; margin-left:auto; margin-right:auto; } #header_wrapper { width:800px; height:140px; } #header { width:800px; height:140px; } #body_wrapper { width:800px; position:absolute; display:block; } .header_transition { width:800px; height:45px; position:absolute; left:0px; top:0px; background-image:url('img/green_bar_cut.png'); z-index:-1; } #body_contents_wrapper { width:800px; position:absolute; top:13px; left:0px; z-index:1; } #body_contents { width:800px; position:absolute; top:32px; left:0px; background-image:url('img/body_bg.png'); z-index:2; } #content_wrapper { width:575px; float:left; margin-top:-32px; } #content { width:510px; margin-left:30px; margin-right:35px; } .content { width:510px; } #footer_wrapper { width:800px; height:105px; clear:both; } </style> <html> <div id="page_wrapper"> <div id="page_header"> <div id="header_wrapper"> <div id="header"> </div> </div> </div> <div id="body_wrapper"> <div class="header_transition"></div> <div id="body_contents_wrapper"> <div id="body_contents"> <div id="content_wrapper"> <div id="content"> <div class="content"> <-- Start Content Here --> </div> </div> </div> </div> </div> </div> <div id="footer_wrapper"> <-- This container is now showing up at the top edge of div id body_contents... --> </div> </div> </html>
Basically, I have everything in the top portion of the document working properly. I just can't get my footer to work below my absolutely positioned element. I have tried wrapping div id body_contents in another div that is positioned statically and no marbles. Please help me get my footer to display in the right place.
![]() |
Similar Threads
- I had problem with onmouse out in div (JavaScript / DHTML / AJAX)
- A little problem I aam haaving wih a drag and drop (JavaScript / DHTML / AJAX)
- Div tag problem with Asp.net -- please help (ASP.NET)
- Help with Div Tag. (JavaScript / DHTML / AJAX)
- Need help with a absolute div (HTML and CSS)
- IE6 problem : Dropdown box over absoute DIV (JavaScript / DHTML / AJAX)
- Absolute position problem with IE (HTML and CSS)
- Problem in my sliding div...plz help.... (JavaScript / DHTML / AJAX)
- Need help with table problem, urgent. (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: jpeg and other image files not displaying in windows 7
- Next Thread: Dream weaver MX Table overstretching
Views: 490 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
alignment asp background backgroundcolor blog browser cart cascade center code compatibility containers corporateidentity create css deleted design designing distortion div dreamweaver drupal editor emailmarketing embed explorer fail firefox float font fonts format free google helprequired-urgent hitcounter hover html ide ie6 ie7 iframe image input internet internetexplorer intranet iphone javascript jpeg js links list map maps margin marketshare missing mozilla mp3 navigationbars newb object offshoreoutsourcingcompany opacity opera override overwrite perl player pnginie6 positioning prevent problem scroll seo shopping strings studio style table tables tag templates text timecolor translation url validation visual visualization w3c web webform website wordpress xhtml xml xsl youtube





