Jump to content

[SOLVED] Floating Content and Footer Below help


liamloveslearning

Recommended Posts

Hi everyone, im trying to produce a very basic skeleton of a header div, content div (containting 2 divs, 1 floats left, 1 right) and then a footer div which should sit below the content, however it doesnt, Ive tried absolutely positioning it but to no avail, if anybody can help id be really greatful, heres my source code

 

src

<div id="container">

  <div id="header">
    	<div id="topbar">asd</div>
  </div>
   
   
   			<div id="content">
                <div id="leftcol">
                  <p>ssdsdsdf</p>
                  <p>sdf</p>
                  <p>ds</p>
                  <p> </p>
                </div>
                <div id="rightcol">
                  <p>sdsddsf</p>
                  <p> </p>
                  <p> </p>
                </div>
    </div>
    
    <div id="footer">sdsd</div>

</div>

 

CSS

<style type="text/css">

	body {
		margin:0;
		}

	#container {
		width:600px;
		height:auto;
		position:relative;
		margin-right: auto;
		margin-left: auto;
		}

	#header {
height:157px;
background-color: #0000CC;
		}

		#topbar {
		height:25px;
		}

	#leftcol {
float:left;
background-color:#CC0000;
height:auto;
width: 412px;
		}
#content {
height: auto;
width: 100%;
}

	#rightcol {
float:right;
width:188px;
height:auto;
background-color: #CCFF99;
		}

	#footer {
background-color: #99CC00;
width: 600px;
left: 0px;
top: 329px;
	}

</style>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.