Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Content overlapping footer problem.

    I'm about to tear the hairs off my head! i can't seem to fix the problem of my content overlapping the footer. I've looked and browsed through most of the forum topics and tried out the solutions but it doesn't seem to work for me! this is my first attempt at div coding and i'd really appreciate it if someone could help me out! I'd like the leftmenu and content to NOT overlap the footer when the text overflows.

    This is my coding:

    Code:
    <!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>
    <style type="text/css">
    <!--
    body {
    	background-image: url(bg.png);
    	background-repeat: repeat-x;
    	margin-top: 0px;
    	
    }
    
    #topbg {
    	width:1000px;
    	height:500px;
    	margin-left: auto;
    	margin-right: auto;
    	margin-top: 0px;
    	background-image: url(bgtop.png);
    	background-repeat: no-repeat;
    	
    }
    
    #mainframe {
    	width:876px;
    	margin-left: auto;
    	margin-right: auto;
    	margin-top: 0px;
    	
    }
    
    #header {
    	width:876px;
    	height:105px;
    	margin-top: 0px;
    
    }
    
    #mainmenu {
    	width:876px;
    	height:32px;
    	margin-top: 0px;
    	padding-top: 7px;
    
    }
    
    #topdivider {
    	width:876px;
    	height:33px;
    	margin-top: 0px;
    	padding: 3px 0;
    }
    
    #leftmenu {
    	width:213px;
    	float:left;
    	margin-bottom: 335px; /* height of footer */	
    	z-index:99;
    	position:absolute;
    
    }
    
    #content {
    	width:663px;
    	float:right;
    	margin-left: 213px;
    	margin-bottom: 335px; /* height of footer */ 	
    	z-index:99;
    	position:absolute;
    	overflow:auto;
    
    }
    
    #footer {
    	width:876px;
    	height:108px;	
    	margin-left: auto;
    	margin-right: auto;
    
    }
    
    #bottombg {
    	width:1000px;
    	height:335px;
    	margin-left: auto;
    	margin-right: auto;
    	margin-bottom: 0px;
    	padding-bottom: 0;
    	background-image: url(bgbottom.png);
    	background-repeat: no-repeat;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="topbg">
    <div id="mainframe">
    <div id="header">"header"</div>
    <div id="mainmenu">"mainmenu"</div>
    <div id="topdivider">"topdivider"</div>
    <div id="leftmenu">
      <p>&nbsp;</p>
      <p>leftmenu</p>
      <p>b</p>
      <p>c</p>
      <p>d</p>
    </div>
    <div id="content">
      <p>"content"</p>
      <p>1</p>
      <p>2</p>
      <p>3</p>
      <p>4</p>
      <p>&nbsp;</p>
    </div>
    "mainframe"</div>
    "topbg"</div>
    <div id="bottombg">
    <div id="footer">"footer"</div>
    "bottombg"</div>
    
    
    </body>
    </html>
    Am i coding it wrongly? Please help!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the advice. I've been trying to assimilate the solution with my template but it doesn't seem to work for me nor solve my prob! But i really appreciate your advice. Sorry it took me so long to reply.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Kyra,
    Have a look at this - I put in background colors to show the different divs.
    Code:
    <!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>
    <style type="text/css">
    html, body {
    	font: 14px "Comic Sans MS";
    	background: #FC6 url(bg.png) repeat-x;
    }
    * {
    	margin: 0;
    	padding: 0;
    	border: none;
    }
    #topbg {
    	width:1000px;
    	margin: 0 auto;
    	background: #F00 url(bgtop.png) no-repeat;
    }
    #mainframe {
    	width:876px;
    	margin: 0 auto;
    	background: #00F;
    }
    #header {
    	width:876px;
    	height:105px;
    }
    #mainmenu {
    	width:876px;
    	height:32px;
    	padding-top: 7px;
    }
    #topdivider {
    	width:876px;
    	height:33px;
    	padding: 3px 0;
    }
    #leftmenu {
    	width:213px;
    	float:left;
    	background: #3FF;
    }
    #content {
    	width:663px;
    	margin-left: 213px;
    	background: #9F0;
    }
    #bottombg {
    	width:1000px;
    	height:335px;
    	margin: 0 auto;
    	background: #366 url(bgbottom.png) no-repeat;
    }
    #footer {
    	width:876px;
    	height:108px;
    	margin: 0 auto;
    	background: #0CC;
    }
    </style>
    </head>
    <body>
    	<div id="topbg">
    	"topbg"
    		<div id="mainframe">
    		"mainframe"
    			<div id="header">"header"</div>
    			<div id="mainmenu">"mainmenu"</div>
    			<div id="topdivider">"topdivider"</div>
    				<div id="leftmenu">
    					<p>&nbsp;</p>
    					<p>leftmenu</p>
    					<p>b</p>
    					<p>c</p>
    					<p>d</p>
    				<!--end leftmenu--></div>
    			<div id="content">
    				<p>"content"</p>
    				<p>1</p>
    				<p>2</p>
    				<p>3</p>
    				<p>4</p>
    				<p>&nbsp;</p>
    			<!--end content--></div>
    		<!--end mainframe--></div>
    	<!--end topbg--></div>
    		<div id="bottombg">
    			"bottombg"
    			<div id="footer">"footer"</div>
    		<!--end bottombg--></div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New to the CF scene
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks,Excavator for taking the effort to build a sample div template for me! I really appreciate it! You totally solved my problem and i'm able to manipulate the codes to suit my template design based on your sample! All that possibilities!

    And to all who took the time to read my SOS msg and devise a way to help me: I truly appreciate it and am grateful for your help! Thanks again!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •