Danh mục : HTML CSS Javascript

Thiết kế form theo tableless style 

HTML tạo form không sử dụng table

  Thiết kế form theo tableless style 

    HTML tạo form không sử dụng table:

CSS Code:
 

label{ 
float: left;
width: 120px;
font-weight: bold;
 }

input, textarea{ 
width: 180px;
margin-bottom: 5px;
 }

textarea{ 
width: 250px;
height: 150px;
 }

.boxes{ 
width: 1em;
 }

#submitbutton{ 
margin-left: 120px;
margin-top: 5px;
width: 90px;
 }

br{ 
clear: left;
 }
input:focus, textarea:focus{ 
background-color: lightyellow;
 }



 

<form> 

<label for="user">Name</label> 
<input type="text" name="user" value="" /><br /> 

<label for="emailaddress">Email Address:</label> 
<input type="text" name="emailaddress" value="" /><br /> 

<label for="comments">Comments:</label> 
<textarea name="comments"></textarea><br /> 

<label for="terms">Agree to Terms?</label> 
<input type="checkbox" name="terms" class="boxes" /><br /> 

<input type="submit" name="submitbutton" id="submitbutton" value="Submit" /> 

</form>

 

Theo phpbasic


Tags