Making a tableless form is fairly very easy. Like the one shown below:
HTML code:
<form id="testform" name="testform" >
<label >Name:</label>
<input type="text" name="name" /><br />
<label >Email:</label>
<input type="text" name="email" /><br />
<label >Comment:</label>
<textarea name="comments" rows="5" cols="25"></textarea><br />
</form>
Add this to your CSS:
#testform label,input ,textarea{
display: block;
width: 150px;
float: left;
margin-bottom: 5px;
}
#testform label {
text-align: right;
width: 75px;
padding-right: 20px;
}
#testform br {
clear: left;
}
Leave a comment