Advertisement
ndburrus

Style Text Inputs as Form Controls @riselda

Aug 19th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. // Style Text Inputs as Form Controls
  2. // @riselda
  3.  
  4.  
  5. <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
  6. <style>
  7. h2 {
  8. font-family: Lobster, Monospace;
  9. }
  10.  
  11. .thick-green-border {
  12. border-color: green;
  13. border-width: 10px;
  14. border-style: solid;
  15. border-radius: 50%;
  16. }
  17.  
  18. </style>
  19. <div class="container-fluid">
  20. <div class="row">
  21. <div class="col-xs-8">
  22. <h2 class="text-primary text-center">CatPhotoApp</h2>
  23. </div>
  24. <div class="col-xs-4">
  25. <a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>
  26. </div>
  27. </div>
  28. <img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera. ">
  29. <div class="row">
  30. <div class="col-xs-4">
  31. <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
  32. </div>
  33. <div class="col-xs-4">
  34. <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
  35. </div>
  36. <div class="col-xs-4">
  37. <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
  38. </div>
  39. </div>
  40. <p>Things cats <span class="text-danger">love:</span></p>
  41. <ul>
  42. <li>cat nip</li>
  43. <li>laser pointers</li>
  44. <li>lasagna</li>
  45. </ul>
  46. <p>Top 3 things cats hate:</p>
  47. <ol>
  48. <li>flea treatment</li>
  49. <li>thunder</li>
  50. <li>other cats</li>
  51. </ol>
  52. <form action="/submit-cat-photo" class="btn btn-primary"> // here, we need to remove this: <form action="/submit-cat-photo" class="btn btn-primary">. the button information (ie class) is positioned inside the button element below.
  53. <div class="row">
  54. <div class="col-xs-6">
  55. <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  56. </div>
  57. <div class="col-xs-6">
  58. <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  59. </div>
  60. </div>
  61. <div class="row">
  62. <div class="col-xs-4">
  63. <label><input type="checkbox" name="personality"> Loving</label>
  64. </div>
  65. <div class="col-xs-4">
  66. <label><input type="checkbox" name="personality"> Lazy</label>
  67. </div>
  68. <div class="col-xs-4">
  69. <label><input type="checkbox" name="personality"> Crazy</label>
  70. </div>
  71. </div>
  72. <input type="text" placeholder="cat photo URL" required> // in the input element, we need to add class="form-control"
  73. // - per the instructions, here: "Give your form's text input field a class of form-control. "
  74. <button type="submit">Submit</button> // this is the button element. here is where we need to add the class information
  75. // class="btn btn-primary" per the instructions, here: Give your form's submit button the classes btn btn-primary.
  76. // we also need to add the font awesome icon information <i class="fa fa-paper-plane"></i>, per the instructions, here:
  77. // Give your form's submit button the classes btn btn-primary.
  78. </form>
  79. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement