css div at bottom of page

Posted on 2008-10-26
Last Modified: 2008-10-26
I have a div which needs to be placed beneath another div.
but for some reason they move side by side.

<div id="wrapper">content</div>
<div id="footer">content</div>



	padding: 0px;

	margin-top: 11px;

	margin-bottom: 0px;

	margin-right: auto;

	margin-left: auto;


	width: 715px;

	voice-family: "\"}\"";


	width: 715px;





	font-family: Arial, Helvetica, sans-serif;

	font-size: 11px;

	color: #666666;

	text-decoration: none;

	text-align: center;



	voice-family: "\"}\"";



	float: none;

	margin: 0px;

	height: 34px;

	border: 1px solid #FF0000;


Open in new window

Question by:Cheryl Lander
LVL 82

Accepted Solution

hielo earned 400 total points
ID: 22809417


to your #footer{...} definition
LVL 44

Assisted Solution

scrathcyboy earned 100 total points
ID: 22809438
<div id="wrapper">content</div>
<BR />
<div id="footer" style="clear:both;">content</div>

The <BR> is guaranteed to put the footer on a line below the wrapper, and the clear:both style FIXES the footer in the page relative to the other DIV and other elements.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now