forms.css 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Artfully masterminded by ZURB
  2. Make sure to include app.js / foundation.js if you are going to use inline label inputs
  3. */
  4. /* -----------------------------------------
  5. Standard Forms
  6. ----------------------------------------- */
  7. form { margin: 0 0 18px; }
  8. form label { display: block; font-size: 13px; line-height: 18px; cursor: pointer; margin-bottom: 9px; }
  9. input.input-text, textarea { border-right: 1px solid #bbb; border-bottom: 1px solid #bbb; }
  10. input.input-text, textarea, select { display: block; margin-bottom: 9px; }
  11. label + input.input-text, label + textarea, label + select, label + div.dropdown, select + div.dropdown { margin-top: -9px; }
  12. /* Text input and textarea font and padding */
  13. input.input-text, textarea { font-size: 13px; padding: 4px 3px 2px; background: #fff; }
  14. input.input-text:focus, textarea:focus { outline: none !important; }
  15. input.input-text.oversize, textarea.oversize { font-size: 18px !important; padding: 4px 5px !important; }
  16. input.input-text:focus, textarea:focus { background: #f9f9f9; }
  17. /* Inlined Label Style */
  18. input.placeholder, textarea.placeholder { color: #888; }
  19. /* Text input and textarea sizes */
  20. input.input-text, textarea { width: 254px; }
  21. input.small, textarea.small { width: 134px; }
  22. input.medium, textarea.medium { width: 254px; }
  23. input.large, textarea.large { width: 434px; }
  24. /* Fieldsets */
  25. form fieldset { padding: 9px 9px 2px 9px; border: solid 1px #ddd; margin: 18px 0; }
  26. /* Inlined Radio & Checkbox */
  27. .form-field input[type=radio], div.form-field input[type=checkbox] { display: inline; width:auto; margin-bottom:0; }
  28. /* Errors */
  29. .form-field.error input, input.input-text.red { border-color: #C00000; background-color: rgba(255,0,0,0.15); }
  30. .form-field.error label, label.red { color: #C00000; }
  31. .form-field.error small, small.error { margin-top: -6px; display: block; margin-bottom: 9px; font-size: 11px; color: #C00000; width: 260px; }
  32. .small + small.error { width: 140px; }
  33. .medium + small.error { width: 260px; }
  34. .large + small.error { width: 440px; }
  35. /* -----------------------------------------
  36. Nicer Forms
  37. ----------------------------------------- */
  38. form.nice div.form-field input, form.nice input.input-text, form.nice textarea { border: solid 1px #bbb; border-radius: 2px; -webkit-border-radius: 2px; -moz-border-radius: 2px; }
  39. form.nice div.form-field input, form.nice input.input-text, form.nice textarea { font-size: 13px; padding: 6px 3px 4px; outline: none !important; background: url(../images/misc/input-bg.png) #fff; }
  40. form.nice div.form-field input:focus, form.nice input.input-text:focus, form.nice textarea:focus { background-color: #f9f9f9; }
  41. form.nice fieldset { border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; }
  42. form.nice div.form-field input[type=radio], form.nice div.form-field input[type=checkbox] { display: inline; width:auto; margin-bottom:0; }
  43. form.nice div.form-field.error small, form.nice small.error { padding: 6px 4px; border: solid 0 #C00000; border-width: 0 1px 1px 1px; margin-top: -10px; background: #C00000; color: #fff; font-size: 12px; font-weight: bold; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -webkit-border-bottom-right-radius: 2px; -moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomright: 2px; }
  44. form.nice div.form-field.error .small + small, form.nice .small + small.error { width: 132px; }
  45. form.nice div.form-field.error .medium + small, form.nice .medium + small.error { width: 252px; }
  46. form.nice div.form-field.error .large + small, form.nice .large + small.error { width: 432px; }
  47. /* -----------------------------------------
  48. Custom Forms
  49. ----------------------------------------- */
  50. form.custom span.custom { display: inline-block; width: 14px; height: 14px; position: relative; top: 2px; border: solid 1px #ccc; background: url(../images/misc/custom-form-sprites.png) 0 0 no-repeat; }
  51. form.custom span.custom.radio { border-radius: 7px; -webkit-border-radius: 7px; -moz-border-radius: 7px; }
  52. form.custom span.custom.radio.checked { background-position: 0 -14px; }
  53. form.custom span.custom.checkbox.checked { background-position: 0 -28px; }
  54. form.custom div.custom.dropdown { position: relative; display: inline-block; width: auto; height: 28px; margin-bottom: 9px; }
  55. form.custom div.custom.dropdown a.current { display: block; width: auto; line-height: 26px; padding: 0 38px 0 6px; border: solid 1px #ddd; color: #141414; }
  56. form.custom div.custom.dropdown a.selector { position: absolute; width: 26px; height: 26px; display: block; background: url(../images/misc/custom-form-sprites.png) -14px 0 no-repeat; right: 0; top: 0; border: solid 1px #ddd; }
  57. form.custom div.custom.dropdown:hover a.selector,
  58. form.custom div.custom.dropdown.open a.selector { background-position: -14px -26px; }
  59. form.custom div.custom.dropdown ul { position: absolute; width: auto; display: none; margin: 0; left: 0; top: 27px; margin: 0; padding: 0; background: rgba(255,255,255,0.9); border: solid 1px #ddd; z-index: 10; }
  60. form.custom div.custom.dropdown ul li { cursor: pointer; padding: 3px 38px 3px 6px; margin: 0; white-space: nowrap}
  61. form.custom div.custom.dropdown ul li.selected { background: url(../images/misc/custom-form-sprites.png) right -52px no-repeat; }
  62. form.custom div.custom.dropdown ul li:hover { background-color: #2a85e8; color: #fff; }
  63. form.custom div.custom.dropdown ul li.selected:hover { background: url(../images/misc/custom-form-sprites.png) #2a85e8 right -78px no-repeat; }
  64. form.custom div.custom.dropdown ul.show { display: block; }
  65. form.custom div.custom.dropdown.open ul { display: block; }