i’m new to html and im having some problems adding a footer. More specifically, when i add the footer, the ‘form’ gets pulled until it reaches the footer – like this http://tinypic.com/view.php?pic=jhbw5g&s=7 . How can i stop it from extending the body of the form?
html code
<body>
<div id="formWrapper">
</center>
<form method ="post" action="addMember.php">
<label for="name">Username:</label>
<input name="name"/>
<label for="password">Password:</label>
<input name="password"/>
<label for="email">Email:</label>
<input name="email"/>
<p>
<fieldset>
<input class="btn" name="submit" type="Submit" value="Register"/>
<input class="btn" name="reset" type="reset" value="Clear Form">
</fieldset>
</form>
<div class="push"></div></div>
<div class="footer">
<p>Copyright (c) 2008</p>
</div>
</body>
Stylesheet
#formWrapper{
width:400px;
border:solid 5px #F1F1F1;
margin-top:300;
margin-bottom:10;
margin-right: auto;
margin-left: auto;
background-color: #AFC8DE;
padding-top: 10px;
min-height: 100%;
height: auto !important;
height: 100%;
}
html, body { height: 100%; }
.push{ background-color: #903; margin: 50px; }
.footer { height: 4em; background-color: #103; }
More specifically min-height: 100%; makes it drag out but unsure how to fix it.
I don’t know what exactly your needs are, but for one your footer div is within the form wrapper, so it will follow the height of whatever that wrapper is.
http://jsfiddle.net/7SgGT/
Here is something I quickly put together. This should get you started on what you’re looking for I believe.