Untitled

HTML/XML Detected Guest 27 Views Size: 1.73 KB Posted on: Sep 10, 25 @ 6:29 PM
  1. 1<style>
  2. 2 html { box-sizing: border-box; }
  3. 3 *, *::before, *::after { box-sizing: inherit; }
  4. 4
  5. 5 /* keep outer tables from overflowing on small screens */
  6. 6 body > form > table {
  7. 7 width: min(100% - 24px, 560px);
  8. 8 margin: 12px auto;
  9. 9 }
  10. 10
  11. 11 /* let inputs/selects ignore the inline 300px width */
  12. 12 input[type="password"],
  13. 13 input[type="text"],
  14. 14 select {
  15. 15 width: 100% !important;
  16. 16 max-width: 100%;
  17. 17 padding: 10px 12px;
  18. 18 }
  19. 19
  20. 20 /* nicer touch targets for buttons */
  21. 21 input[type="submit"],
  22. 22 input[type="reset"] {
  23. 23 padding: .6rem 1rem;
  24. 24 }
  25. 25
  26. 26 /* mobile stuff */
  27. 27 @media (max-width: 640px) {
  28. 28 /* stack each row of the INNER tables (label above field) */
  29. 29 /* structure is: form > table(outer) > td > table(inner) */
  30. 30 form table table tr {
  31. 31 display: block;
  32. 32 margin-bottom: .75rem;
  33. 33 }
  34. 34 form table table tr td {
  35. 35 display: block;
  36. 36 width: 100% !important;
  37. 37 }
  38. 38
  39. 39 /* hide the tiny spacer column */
  40. 40 form table table tr > td:nth-child(2),
  41. 41 form table table td[width="20"] {
  42. 42 display: none !important;
  43. 43 }
  44. 44
  45. 45 /* make labels bolder when stacked */
  46. 46 form table table tr td:first-child {
  47. 47 font-weight: 600;
  48. 48 margin-bottom: .25rem;
  49. 49 font-size: 0.95rem;
  50. 50 }
  51. 51
  52. 52 /* header row */
  53. 53 form table table tr:first-child td[colspan="3"] {
  54. 54 text-align: center !important;
  55. 55 }
  56. 56 form table table tr:first-child td[colspan="3"] img {
  57. 57 float: none !important;
  58. 58 display: block;
  59. 59 margin: 0 auto .5rem;
  60. 60 }
  61. 61
  62. 62 /* button rows
  63. 63 form table table tr td[colspan="3"] input[type="submit"],
  64. 64 form table table tr td[colspan="3"] input[type="reset"] {
  65. 65 width: 48%;
  66. 66 margin: 0 1% .25rem 1%;
  67. 67 }
  68. 68 }
  69. 69</style>

Raw Paste

Comments 0
Login to post a comment.
  • No comments yet. Be the first.
Login to post a comment. Login or Register
We use cookies. To comply with GDPR in the EU and the UK we have to show you these.

We use cookies and similar technologies to keep this website functional (including spam protection via Google reCAPTCHA), and — with your consent — to measure usage and show ads. See Privacy.