Guest User

Untitled

a guest
Aug 29th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <style>
  4. input[type=text], select {
  5. width: 100%;
  6. padding: 12px 20px;
  7. margin: 8px 0;
  8. display: inline-block;
  9. border: 1px solid #ccc;
  10. border-radius: 4px;
  11. box-sizing: border-box;
  12. }
  13.  
  14. input[type=submit] {
  15. width: 100%;
  16. background-color: #4CAF50;
  17. color: white;
  18. padding: 14px 20px;
  19. margin: 8px 0;
  20. border: none;
  21. border-radius: 4px;
  22. cursor: pointer;
  23. }
  24.  
  25. input[type=submit]:hover {
  26. background-color: #45a049;
  27. }
  28.  
  29. div {
  30. border-radius: 5px;
  31. background-color: #f2f2f2;
  32. padding: 20px;
  33. }
  34. </style>
  35. <body>
  36.  
  37. <h3>Using CSS to style a HTML Form</h3>
  38.  
  39. <div>
  40. <form action="action_page.php">
  41. <label for="fname">First Name</label>
  42. <input type="text" id="fname" name="firstname">
  43.  
  44. <label for="lname">Last Name</label>
  45. <input type="text" id="lname" name="lastname">
  46.  
  47. <label for="country">State</label>
  48. <select id="country" name="country">
  49. <option value="australia">Australia</option>
  50. <option value="canada">Canada</option>
  51. <option value="usa">USA</option>
  52. </select>
  53.  
  54. <input type="submit" value="Submit">
  55. </form>
  56. </div>
  57.  
  58. </body>
  59. </html>
Add Comment
Please, Sign In to add comment