Making Text Boxes Aligned - html

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>

Related

Errors in validator

I, getting a lot of errors in validator but I don't understand the reasons of it.
end tag for "form" omitted, but OMITTAG NO was specified
required attribute "action" not specified
<div class="serch_block">
<form method="post" action="/search">
<table>
<tr>
<td>
<input type="text" class="form_in" name="search" value="" />
</td>
<td>
<input type="image" src="/design/img/button.jpg" name="submit" style="width:20px;height:19px;" onfocus='this.value="";' value="Поиск" />
</td>
</tr>
</table>
</form>
</div>
document type does not allow element "span" here; missing one of "th", "td" start-tag
<tr>
<td width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
<td><input type="text" class="form_in" name="email" /></td>
<span id="error_email" style="color:#ff0000;" class="<?php if(!isset($errors['email']))echo 'invisible';?>">Name and / or E-mail / are required!</span>
</tr>
Can you help me with it?
Here is the form.
<form action="/" method="post">
<table align="center" border="0">
<tr class="boss">
<td width="30" valign="top" align="left" class="text2news">Имя:
</td>
<td>
<input type="text" class="form_in" name="name" />
<span id="error_name" style="color:#ff0000" class="invisible"></span> </td>
<!--</td> -->
</tr>
<tr>
<td width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
<td ><input type="text" class="form_in" name="email" /></td>
<span id="error_email" style="color:#ff0000;" class="invisible">Имя и /или E-mail/ обязательны для заполенения!</span>
</tr>
<tr class="registrationBot">
<td><input type="submit" name="subscribe" value="подписаться" /></td>
<td><input type="submit" name="unsubscribe" value="отписаться" /><input type="submit" name="cleenerror" value="закрыть" /></td>
</tr>
<tr>
<td colspan="2" style="color:#ff0000"></td>
</tr>
</table>
</form>

How to style a option

I am trying to make the select option wider but I cant get it to work. I have tried with width but it didn't work for me. I also couldn't find anything on the internet.
I hope somebody can help me.
This is my HTML:
<form action="" method="post">
<legend>Neem contact op</legend>
<table>
<tr>
<td>
<label for="Naam">Naam: </label>
</td>
<td>
<input type="text" id="Naam" name="Naam" placeholder="Naam" required="required" />
</td>
</tr>
<tr>
<td>
<label for="Email">Email :</label>
</td>
<td>
<input type="email" id="Email"name="Email" placeholder="Email" required="required" />
</td>
</tr>
<tr>
<td>
<label for="Seizoen">Seizoen: </label>
</td>
<td>
<select name="Seizoen" id="Seizoen" required>
<option value="">Kies hier je seizoen</option>
<option value="Lente">Lente</option>
<option value="Zomer">Zomer</option>
<option value="Herfst">Herfst</option>
<option value="Winter">Winter</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<hr />
</td>
</tr>
<tr>
<td>
<label for="benodigheden1">Benodigheden:</label>
</td>
<td>
<input type="text" id="benodigheden1"name="benodigheden1" placeholder="Benodigheden" required="required" />
</td>
</tr>
<tr>
<td>
<label for="ingrediënten1">Ingrediënten:</label>
</td>
<td>
<input type="text" id="ingrediënten1"name="ingrediënten1" placeholder="Ingrediënten" required="required" />
</td>
</tr>
<tr>
<td>
<label for="stappenplan">Stappenplanm:</label>
</td>
<td>
<textarea name="stappenplan" id="stappenplan" cols="40" rows="5" placeholder="Stappenplan" required="required" /></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<hr />
</td>
</tr>
<tr>
<td>
<label for="Opmerking">Opmerking:</label>
</td>
<td>
<textarea name="Opmerking" id="Opmerking" cols="40" rows="5" placeholder="Opmerking" required="required" /></textarea>
</td>
</tr>
<tr>
<td>
</td>
<td>
<div class="submit"><input type="submit" value="Verzenden" name="Verzenden" /></div>
</td>
</tr>
</table>
Here is a link to JSFiddle.
See this fiddle
You have to add the below CSS for styling the select
select{
width: 300px;
}
The best option is to try padding like;
select{
padding: 20px;
}
Here is the demo..

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%}

Multiple forms problem

I have 2 forms one after another, but the second one is not posting at all. Everything works fine except the submitting. Can I have 2 forms like this?
<form action="getRates.php" name="rates" method="post" onSubmit="popupform(this, 'join')">
<table style="width: 216px">
<tr>
<td style="width: 115px; height: 49px;"><span class="style16">Weight</span><br/>
<input type="text" id="weight" name="weight" size="10" maxlength="4"/>
<input type="hidden" id="weightOne" name ="weightOne">
<input type="hidden" id="weightTwo" name ="weightTwo">
<input type="hidden" id="weightThree" name="weightThree">
<input type="hidden" id="weightFour" name="weightFour">
</td>
<td align="right" style="width: 68px; height: 49px;" valign="top"><span class="style16">Zip Code</span><br/>
<input type="text" id="zip" name="zip" size="10" maxlength="5"/>
</td>
</tr>
<tr>
<td style="width: 115px">
<input name="submit" type="submit" value="Door Hanger Rates" style="width: 138px" />
</td>
</tr>
</table>
</form>
<form action="getBusinessRates.php" name="businessRates" method="post" onSubmit="popupform(this, 'join')">
<table style="width: 216px">
<tr>
<td style="width: 115px; height: 49px;"><span class="style16">Weight</span><br/>
<input type="text" id="businessWeight" name="businessWeight" size="10" maxlength="4" />
</td>
<td align="right" style="width: 68px; height: 49px;" valign="top"><span class="style16">Zip Code</span><br/>
<input type="text" id="businessZip" name="businessZip" size="10" maxlength="5" />
</td>
</tr>
<tr>
<td style="width: 115px">
<input name="businessSubmit" type="submit" value="Business Card Rates" style="width: 138px" />
</td>
</tr>
</table>
</form>
Your same code is working, you can check it out here. It might be some other issue probably.

Align tops of two tables

There are two tables on my page and they appear side-by-side. I want to align the tops of the two tables. How to do that?
Edited:
<body>
<table id="main" cols="2">
<tr>
<td>
<Form id="frmNewEntry" method="post" action="insert_listing.php">
<table id="tblEntry" cols="3" style="border-color:lightblue; border-style:solid;">
<tr><td colspan="3" bgcolor="lightblue" align="center"><strong>Real-Time Vacancy Entry</strong></td></tr>
<tr><td>Date:</td><td><input id="LDate" name="LDate" type="text" size="20" maxlength="11"/>[Select Date from the Calendar Control]
<script type="text/javascript">
calendar.set("LDate");
</script></td>
<td>
<table>
<tr>
<td rowspan="6">
<!-- <iframe src="show_db_vacancy_entries.php" height="800px" width="300px" bordercolor="cyan">
</iframe> -->
</td>
</tr>
</table>
</td>
</tr>
<tr><td>Places:</td><td><input id="Places" name="Places" type="text" size="35" maxlength="30" onblur="this.value=MakeInitialCapital(this.value);"></td></tr>
<tr><td>Company:</td><td><input id="Company" name="Company" type="text" size="50" onblur="this.value=MakeInitialCapital(this.value);">
<!-- <input type="button" value="Make Initial Capital" align="left" onclick="this.value=MakeInitialCapital(this.value);"></tr> -->
<tr><td>Designation:</td><td><input id="Designation" name="Designation" type="text" size="50" onblur="this.value=MakeInitialCapital(this.value);"></td></tr>
<tr><td>Project Details:</td><td><textarea id="ProjectDetails" name="ProjectDetails" cols="100" rows="10"></textarea></td></tr>
<tr><td>Desired Candidate:</td><td><textarea id="DesiredCandidate" name="DesiredCandidate" rows="3" cols="100"></textarea> <br></td></tr>
<tr><td>HR Name:</td><td><input id="HRName" name="HRName" type="text" size="50" onblur="this.value=MakeInitialCapital(this.value);"> <br></td></tr>
<tr><td>HR Contact:</td><td><input id="HRContact" name="HRContact" type="text" size="50"> <br></td></tr>
<tr><td>Email:</td><td><input id="Email" name="Email" type="text" size="50"> <br></td></tr>
<tr></tr>
<tr>
<td bgcolor="lightblue">
<input id="Submit" name="Submit" value="Clear" type="button">
</td>
<td bgcolor="lightblue">
<input id="Submit" name="Submit" value="Submit" type="button">
</td>
</tr>
</table>
</Form>
</td>
<td>
<table id="list" cols="2" style="border:none">
<tr>
<td colspan="2" style="border:none">
<iframe src="show_db_vacancy_entries.php" height="800px" style="border:none;">
</iframe>
</td>
</tr>
<tr>
<td align="left">
<input id="Update" name="Update" value="Update" type="button">
</td>
<td align="right">
<input id="Delete" name="Delete" value="Delete" type="button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
as far as i could understand your question: you should use:
<table id="table 1">
<tr>
<td valign="top">....<td>
</tr>
</table>
<table id="table 2">
<tr>
<td valign="top">....<td>
</tr>
</table>
Try This one
<div>
<table id="tbl1" style="float:left"></table>
<table id="tbl2" style="float:left"></table>
</div>