Footer not staying at bottom of page after a form - html

I am having a problem with the placement of my footer on my contact page. On every other page of my site the Footer is correctly placed at the bottom of the page, but for some reason the footer is sitting ABOVE my form, even covering the first input box. Can someone please help me?
Here is the coding for my contact form:
footer {
display: block;
clear: both;
font-size: 0.8em;
height: 50px;
text-align: center;
width:960px;
margin: auto;
position: absolute;
}
footer .footer-wrapper {
margin: 0;
padding: 3px 20px;
}
ul#social li {
display: inline;
list-style: none;
}
ul#social li a {
color: #999;
text-decoration: none;
}
a.facebook, a.twitter {
display: block;
float: left;
height: 24px;
padding-left: 17px;
text-indent: -9999px;
width: 16px;
}
<section>
<div>
<form name="customerForm" method="post" action="?">
<table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center">
<tr>
<td>Name: </td>
<td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td>
</tr>
<tr>
<td>Email: </td>
<td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td>
</tr>
<tr>
<td>Mobile: </td>
<td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td>
</tr>
<tr>
<td>Enquiry: </td>
<td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="Send" />
<input type="reset" name="reset" value="Clear Form"/></td>
</tr>
</form>
</div>
</section>
<footer>
<div class="footer-wrapper">
<div class="float-left">
<p>© My-Com Computers</p>
</div>
<div class="float-right">
<ul id="social">
<li>Facebook</li>
<li>Twitter</li>
</ul>
</div>
</div>
</footer>

you missed table close tag your html </table>
<section>
<div>
<form name="customerForm" method="post" action="?">
<table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center">
<tr>
<td>Name: </td>
<td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td>
</tr>
<tr>
<td>Email: </td>
<td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td>
</tr>
<tr>
<td>Mobile: </td>
<td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td>
</tr>
<tr>
<td>Enquiry: </td>
<td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="Send" />
<input type="reset" name="reset" value="Clear Form"/></td>
</tr>
</table><!-- new added-->
</form>
</div>
</section>
here is your output https://jsfiddle.net/mxmd5jq9/

You forgot to close the table tag
<section>
<div>
<form name="customerForm" method="post" action="?">
<table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center">
<tr>
<td>Name: </td>
<td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td>
</tr>
<tr>
<td>Email: </td>
<td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td>
</tr>
<tr>
<td>Mobile: </td>
<td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td>
</tr>
<tr>
<td>Enquiry: </td>
<td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="Send" />
<input type="reset" name="reset" value="Clear Form"/></td>
</tr>
</table>
</form>
</div>
</section>

Related

How do I bring the entry box closer to the names in html?

I am trying to bring the entry fields closer to the names; it looks bit far. wanted to see if anybody can suggest. Html and css are shown below. This is how it looks now:
<div id="container">
<h3>Add Student</h3>
<form action="StudentControllerServlet" method="GET">
<input type="hidden" name="command" value="ADD" />
<table>
<tbody>
<tr>
<td><label>First name:</label></td>
<td> <input type="text" name="firstName"/></td>
</tr>
<tr>
<td><label>Last name:</label></td>
<td><input type="text" name="lastName"/></td>
</tr>
<tr>
<td><label>Email:</label></td>
<td> <input type="text" name="email" /></td>
</tr>
</tbody>
</table>
</form>
</div>
/* To mimic your screenshot */
#container table {
width: 50%;
outline: red 1px dotted;
}
/* To align your text closer */
#container table td:first-child {
outline: green 1px dashed;
text-align: right;
}
<div id="container">
<h3>Add Student</h3>
<form action="StudentControllerServlet" method="GET">
<input type="hidden" name="command" value="ADD" />
<table>
<tbody>
<tr>
<td><label>First name:</label></td>
<td> <input type="text" name="firstName"/></td>
</tr>
<tr>
<td><label>Last name:</label></td>
<td><input type="text" name="lastName"/></td>
</tr>
<tr>
<td><label>Email:</label></td>
<td> <input type="text" name="email" /></td>
</tr>
</tbody>
</table>
</form>
</div>

How to center input field?

I'm not so good with using display values to organize forms, it would be great if you would give me an example of being able to organize in an up-to-date way.
I'm making a login/register system, and I want to center the input fields in the div. Here's the code of the login form:-
<body style='font-family: Times New Roman, verdana, sans-serif;'>
<div style='width: 70%; padding 10px; border: 5px solid #316ED6; background-color: #648CD1; color: #31D8EB; margin: auto; text-align: center;'>
<h1>Register Now!</h1>
<br />
<form action='' method='post'/>
<table>
<tr>
<td>
<b>Username:</b>
</td>
<td>
<input type='text' name='username' style='padding: 4px'/>
</td>
<tr>
<td>
<b>Password:</b>
</td>
<td>
<input type='password' name='password' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>Re-enter Password</b>
</td>
<td>
<input type='passsword' name='passwordconfirm' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>First and Last Name:</b>
</td>
<td>
<input type='text' name='name' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<input type='submit' name='register' value='Complete Registration'/>
</td>
</tr>
</table>
</form>
<h4>Already own a Connection account? Login <a href='index.php'>Here!</a></h4>
</div>
</body>
Simplest possible is to give the form display: inline-block.
Setting text-align: left; on the table will control the labels text alignment
<body style='font-family: Times New Roman, verdana, sans-serif;'>
<div style='width: 70%; padding 10px; border: 5px solid #316ED6; background-color: #648CD1; color: #31D8EB; margin: auto; text-align: center;'>
<h1>Register Now!</h1>
<br />
<form action='' method='post' style="display: inline-block" />
<table style="text-align: center;">
<tr>
<td>
<b>Username:</b>
</td>
<td>
<input type='text' name='username' style='padding: 4px'/>
</td>
<tr>
<td>
<b>Password:</b>
</td>
<td>
<input type='password' name='password' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>Re-enter Password</b>
</td>
<td>
<input type='passsword' name='passwordconfirm' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>First and Last Name:</b>
</td>
<td>
<input type='text' name='name' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type='submit' name='register' value='Complete Registration' style="width: 100%"/>
</td>
</tr>
</table>
</form>
<h4>Already own a Connection account? Login <a href='index.php'>Here!</a></h4>
</div>
</body>
Side note:
By updating the last tr like this, you'll get a nice positioned button too
<tr>
<td>
</td>
<td>
<input type='submit' name='register' value='Complete Registration' style="width: 100%"/>
</td>
</tr>
you could just add a css rule to your table
table{
margin:0 auto;
}
The Easiest way to do this is to use the center tag <center> </center>
I edited your code to center the entire form.
<body style='font-family: Times New Roman, verdana, sans-serif;'>
<div style='width: 70%; padding 10px; border: 5px solid #316ED6; background-color: #648CD1; color: #31D8EB; margin: auto; text-align: center;'>
<h1>Register Now!</h1>
<br />
<center>
<form action='' method='post'/>
<table>
<tr>
<td>
<b>Username:</b>
</td>
<td>
<input type='text' name='username' style='padding: 4px'/>
</td>
<tr>
<td>
<b>Password:</b>
</td>
<td>
<input type='password' name='password' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>Re-enter Password</b>
</td>
<td>
<input type='passsword' name='passwordconfirm' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<b>First and Last Name:</b>
</td>
<td>
<input type='text' name='name' style='padding: 4px'/>
</td>
</tr>
<tr>
<td>
<input type='submit' name='register' value='Complete Registration'/>
</td>
</tr>
</table>
</form>
</center>
<h4>Already own a Connection account? Login <a href='index.php'>Here!</a></h4>
</div>
</body>
snippet below
form{
text-align:center;
}
#form_table{
display:inline-table;
}
<body style='font-family: Times New Roman, verdana, sans-serif;'>
<div style='width: 70%; padding 10px; border: 5px solid #316ED6; background-color: #648CD1; color: #31D8EB; margin: auto; text-align: center;' id="meta_container">
<h1>Register Now!</h1>
<br />
<form action='' method='post'/>
<table id="form_table">
<tr>
<td>
<b>Username:</b>
</td>
<td>
<input type='text' name='username' style='padding: 4px' />
</td>
<tr>
<td>
<b>Password:</b>
</td>
<td>
<input type='password' name='password' style='padding: 4px' />
</td>
</tr>
<tr>
<td>
<b>Re-enter Password</b>
</td>
<td>
<input type='passsword' name='passwordconfirm' style='padding: 4px' />
</td>
</tr>
<tr>
<td>
<b>First and Last Name:</b>
</td>
<td>
<input type='text' name='name' style='padding: 4px' />
</td>
</tr>
<tr>
<td>
<input type='submit' name='register' value='Complete Registration' />
</td>
</tr>
</table>
</form>
<h4>Already own a Connection account? Login <a href='index.php'>Here!</a></h4>
</div>
</body>

How to get two forms (tables) to align beautifully and look pretty

[Update]: A JSFiddle with the code (or what I was able to come up with as needed) - http://jsfiddle.net/CWwvC/1/
I am sorry for bothering you with something so lame, but I am stuck with a problem - you can see the issue here -
I've been searching in Google for the past 3 hours and I feel totally crushed now =[ There are solutions out there and I just feel like my mind has blocked and I can't think straight anymore =[
I will paste the whole Form HTML and the CSS part related to it.
Any help is deeply appreciated!
Thanks in advance!!!
HTML:
<form name='addUser' action="" method='post'>
<table id="table" style="float: left;">
<tr>
<td><label for='professionOfChoice'>Desired Profession:</label></td>
<td><select id='professionOfChoice' name='professionOfChoice' />
<option value="1" <?php echo $professionOfChoice == '1' ?'selected="selected"' : '';?>>Journalist</option>
<option value="2" <?php echo $professionOfChoice == '2' ?'selected="selected"' : '';?>>HR</option>
</select>
</td>
</tr>
<tr>
<td>
<br/>
</td>
</tr>
<tr>
<td><label for='username'>Desired Username:</label></td>
<td><input type='text' id='username' name='username' value="<?php echo $username;?>" />
<?php echo empty($errors['username']) ? '' :
'<font color="red">'.$errors['username'].'</font>';?>
</td>
<td id="message"></td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><label for='email'>Email:</label></td>
<td><input type='text' id='email' name='email' value="<?php echo $email;?>" />
<?php echo empty($errors['email']) ? '' : '<font color="red">'.$errors['email'].'</font>';?> </td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><label for='price'>Password:</label></td>
<td><input type='password' id='password' name='password' />
<?php echo empty($errors['password']) ? '' :
'<font color="red">'.$errors['password'].'</font>';?>
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><label for='password2'>Repeat Password:</label></td>
<td><input type='password' id='password2' name='password2' />
<?php echo empty($errors['password2']) ? '' :
'<font color="red">'.$errors['password2'].'</font>';?>
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><label for='gender'>Gender:</label></td>
<td><select id='gender' name='gender'>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><input type='submit' name='submit' value='Start!' /></td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
</table>
</form>
<form action="" method='post'>
<table id="login">
<?php echo empty($errors['login']) ? '' : '<font color="red">'.$errors['login'].'</font>';?>
<tr>
<td><input type='text' name='user' value="<?php echo $username;?>" /></td>
</tr>
<tr>
<td><input type='password' id='password' name='password' /></td>
</tr>
<tr>
<td><button type="submit">Login</button></td>
</tr>
</table>
</form>
CSS:
#login {
width: 30%;
margin-left: 60%;
font: bold italic 12px/30px Georgia, serif;
background: rgba(54, 25, 25, .5);
}
table, th, td {
border-collapse:collapse;
width:30%;
margin-left:20%;
font: bold italic 12px/30px Georgia, serif;
background: rgba(54, 25, 25, .5);
}

Website monitor display issue

I have a website that displays differently on different monitors.
Desktop:
Laptop:
HTML
<body>
<div id="Links">
<img src="Slideshow/About.png" width="140em" />
<br /><br />
<img src="Slideshow/Contact.fw.png" width="140em" />
<br /><br />
<img src="Slideshow/Services.fw.png" width="140em" />
</div>
<div id="mainText">
<h1>Contact</h1>
<p>If you want to contact me please call at <b>1.800.SUCCESS</b> or use the form below to sned me an email!</p>
</div>
<form name="contactform" method="post" action="send_form_email.php">
<table id="conTable">
<tr>
<td valign="top">
<label for="first_name">First Name *</label>
</td>
<td valign="top">
<input type="text" name="first_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top"">
<label for="last_name">Last Name *</label>
</td>
<td valign="top">
<input type="text" name="last_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="email">Email Address *</label>
</td>
<td valign="top">
<input type="text" name="email" maxlength="80" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="telephone">Telephone Number</label>
</td>
<td valign="top">
<input type="text" name="telephone" maxlength="30" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="comments">Comments *</label>
</td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
CSS
body
{
background-image:url(Pictures/background.jpg);
background-repeat:no-repeat;
background-size:100%;
}
#mainText
{
position: absolute;
width: 70%;
float: left;
left: 14em;
}
#conTable
{
left:14em;
top:8em;
position:absolute;
}
#Banner
{
position:absolute;
padding-left:40%;
}
#Links
{
position:absolute;
float:left;
width:50px;
}
Can anyone please tell me why things look different on my laptop then it does on my desktop and how to fix it. As you can see from the pictures everything on my laptop is shifted to the left.
Try wrapping a "Relative" #container around all your "absolute" divs. I've adjusted your code below:
<body>
<div id="container">
<div id="Links">
<img src="Slideshow/About.png" width="140em" />
<br /><br />
<img src="Slideshow/Contact.fw.png" width="140em" />
<br /><br />
<img src="Slideshow/Services.fw.png" width="140em" />
</div>
<div id="mainText">
<h1>Contact</h1>
<p>If you want to contact me please call at <b>1.800.SUCCESS</b> or use the form below to sned me an email!</p>
</div>
<form name="contactform" method="post" action="send_form_email.php">
<table id="conTable">
<tr>
<td valign="top">
<label for="first_name">First Name *</label>
</td>
<td valign="top">
<input type="text" name="first_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top"">
<label for="last_name">Last Name *</label>
</td>
<td valign="top">
<input type="text" name="last_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="email">Email Address *</label>
</td>
<td valign="top">
<input type="text" name="email" maxlength="80" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="telephone">Telephone Number</label>
</td>
<td valign="top">
<input type="text" name="telephone" maxlength="30" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="comments">Comments *</label>
</td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
</div>
</body>
CSS:
body
{
background-image:url(Pictures/background.jpg);
background-repeat:no-repeat;
background-size:100%;
}
#mainText
{
position: absolute;
width: 70%;
left: 14em;
}
#conTable
{
left:14em;
top:8em;
position:absolute;
}
#Banner
{
position:absolute;
padding-left:40%;
}
#Links
{
position:absolute;
top: 0;
left: 0;
width:50px;
}
#container {position: relative; width: 100%}

Making Text Boxes Aligned

I am having an issue right now. When I load up my webpage, all of the boxes/words are aligned awkwardly, and I was wondering if I can get some help aligning the boxes all to be on the same line.
click here for a jsfiddle demo
<table bgcolor="#bbbbbb" width="100%" border="0" cellspacing="0" cellpadding="0" valign="center">
<tr>
<td width="10%" valign="top" align="center">
<form name="form1" method="post" action="checklogin.php">
<font size="5"><strong>Account Login</strong></font><br />
Username :
<input name="myusername" type="text" id="myusername"><br />
Password :
<input name="mypassword" type="password" id="mypassword"> <br />
<input style="width:75px; font-size:14px; height:25px;" type="submit" name="Submit" value="Login">
</form>
</td>
<td width="10%" valign="top" align="center">
<form id="form1" name="form1" method="post" action="registration_script.php">
<font size="5"><strong>Account Register</strong></font><br />
Username :
<input type="text" name="txtUser" id="txtUser" /> <br />
Repeat :
<input name="myusername" type="text" id="myusername"><br />
Password :
<input type="password" name="txtPassword" id="txtPassword" /> <br />
Repeat :
<input name="myusername" type="text" id="myusername"><br />
<input style="width:75px; font-size:14px; height:25px;" type="submit" name="btnRegister" id="btnRegister" value="Register" />
</td>
</tr>
</form>
</table>
try to check this one: Edited
hope this gives the idea(on my own very way:)).
<table bgcolor="#bbbbbb" width="100%" border="0" cellspacing="0" cellpadding="0" valign="center">
<tr>
<td width="10%" valign="top" align="center">
<form name="form1" method="post" action="checklogin.php">
<table>
<thead align="center">Account Login</thead>
<tr>
<td>Username :</td>
<td><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password :</td>
<td><input name="mypassword" type="password" id="mypassword"></td>
</tr>
<tr>
<td></td>
<td colspan="1"><input style="width:75px; font-size:14px; height:25px;" type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</form>
</td>
<td width="10%" valign="top" align="center">
<form id="form1" name="form1" method="post" action="registration_script.php">
<table>
<thead align="center">Account Register</thead>
<tr>
<td>Username :</td>
<td> <input type="text" name="txtUser" id="txtUser" /></td>
</tr>
<tr>
<td>Repeat :</td>
<td><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password :</td>
<td><input type="password" name="txtPassword" id="txtPassword" /></td>
</tr>
<tr>
<td>Repeat :</td>
<td><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td></td>
<td colspan="1"><input style="width:75px; font-size:14px; height:25px;" type="submit" name="btnRegister" id="btnRegister" value="Register" /></td>
</tr>
</table>
</form>
</td>
</tr>
​
In case you don't mind tableless:
<style>
.pseudo-table, form p {
display: table;
background-color: #bbbbbb;
}
.pseudo-cell, form p label {
display: table-cell;
vertical-align: top;
}
form p label {
width: 100px;
}
</style>
<div class='pseudo-table'>
<div class='pseudo-cell'>
<form name='form1' method='post' action='checklogin.php'>
<h2>Account Login</h2>
<p>
<label>Username</label>
: <input name='myusername' type='text' id='myusername'>
</p>
<p>
<label>Password</label>
: <input name='mypassword' type='password' id='mypassword'>
</p>
<button>Login</button>
</form>
</div>
<div class='pseudo-cell'>
<form name='form2' method='post' action='registration_script.php'>
<h2>Account Register</h2>
<p>
<label>Username</label>
: <input type='text' name='txtUser' id='txtUser'>
</p>
<p>
<label>Repeat</label>
: <input name='myusername' type='text' id='myusername'>
</label>
<p>
<label>Password</label>
: <input type='password' name='txtPassword' id='txtPassword'>
</p>
<p>
<label>Repeat</label>
: <input name='myusername' type='text' id='myusername'>
</p>
<button>Login</button>
</form>
</div>
</div>
you can define you own css to define the alignment
for example:
<style>
selector{
float:left;
}
</style>