Advertisement
joachip

Styling input fields and buttons

Sep 14th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.08 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html lang="en">
  3. <head>
  4.  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5.  <title>Blargh</title>
  6.  <style type="text/css">
  7. body
  8. {
  9.     padding: 5mm;
  10.     background: #204040;
  11.     color: #A0B0B0;
  12. }
  13.  
  14. .button
  15. {
  16.     background-color: #4CAF50;
  17.     border: solid 0.3mm #000000;
  18.     color: #FFFFFF;
  19.     padding: 2mm 2mm;
  20.     text-align: center;
  21.     text-decoration: none;
  22.     display: inline-block;
  23.     font-size: 4mm;
  24.     border-radius: 1.5mm;
  25. }
  26.  
  27. .button:hover
  28. {
  29.     background-color: #5CBF60;
  30.     border: solid 0.3mm #FFFFFF;
  31. }
  32.  
  33. .inputfield
  34. {
  35.     background-color: #4CAF50;
  36.     border: solid 0.3mm #000000;
  37.     color: #FFFFFF;
  38.     padding: 2mm 2mm;
  39.     text-align: center;
  40.     text-decoration: none;
  41.     display: inline-block;
  42.     font-size: 4mm;
  43.     border-radius: 1.5mm;
  44. }
  45.  
  46. .inputfield:hover
  47. {
  48.     background-color: #5CBF60;
  49.     border: solid 0.3mm #FFFFFF;
  50. }
  51.  
  52.  </style>
  53. </head>
  54. <body>
  55. <input type="text" name="bla1" value="default value" class="inputfield">
  56. <input type="submit" name="bla2" value="click me" class="button">
  57. </body>
  58. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement