Tableless Forms


/ Published in: HTML
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <label for="name">Name</label>
  2. <input id="name" name="name"><br>
  3. <label for="address">Address</label>
  4. <input id="address" name="address"><br>
  5. <label for="city">City</label>
  6. <input id="city" name="city"><br>
  7. </form>
  8.  
  9. label,input {
  10. display: block;
  11. width: 150px;
  12. float: left;
  13. margin-bottom: 10px;
  14. }
  15.  
  16. label {
  17. text-align: right;
  18. width: 75px;
  19. padding-right: 20px;
  20. }
  21.  
  22. br {
  23. clear: left;
  24. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.