Facebook Login Form


/ Published in: CSS
Save to your folder(s)

Tested in Firefox 4, Safari 4, Chrome 14, Opera 10, IE 8 (and newer)


Copy this code and paste it in your HTML
  1. HTML:
  2. <!DOCTYPE html>
  3. <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
  4. <!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en"> <![endif]-->
  5. <!--[if IE 8]> <html class="lt-ie9" lang="en"> <![endif]-->
  6. <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
  7. <head>
  8. <meta charset="utf-8">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <title>Facebook Login Form</title>
  11. <link rel="stylesheet" href="css/style.css">
  12. <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  13. </head>
  14. <body>
  15. <form class="login" onsubmit="return false">
  16. <h1>Facebook</h1>
  17. <input type="email" name="email" class="login-input" placeholder="Email Address" autofocus>
  18. <input type="password" name="password" class="login-input" placeholder="Password">
  19. <input type="submit" value="Login" class="login-submit">
  20. <p class="login-help"><a href="#">Forgot password?</a></p>
  21. </form>
  22. </body>
  23. </html>
  24.  
  25.  
  26. CSS:
  27. @import url(http://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.css);
  28.  
  29. body {
  30. font: 12px/20px 'Lucida Grande', Verdana, sans-serif;
  31. color: #404040;
  32. background: #ebc9a2;
  33. }
  34.  
  35. input, textarea, select, label {
  36. font-family: inherit;
  37. font-size: 12px;
  38. -webkit-box-sizing: border-box;
  39. -moz-box-sizing: border-box;
  40. box-sizing: border-box;
  41. }
  42.  
  43. .login {
  44. margin: 20px auto;
  45. padding: 18px 20px;
  46. width: 200px;
  47. background: #3f65b7;
  48. background-clip: padding-box;
  49. border: 1px solid #172b4e;
  50. border-bottom-color: #142647;
  51. border-radius: 5px;
  52. background-image: -webkit-radial-gradient(cover, #437dd6, #3960a6);
  53. background-image: -moz-radial-gradient(cover, #437dd6, #3960a6);
  54. background-image: -o-radial-gradient(cover, #437dd6, #3960a6);
  55. background-image: radial-gradient(cover, #437dd6, #3960a6);
  56. -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), inset 0 0 1px 1px rgba(255, 255, 255, 0.1), 0 2px 10px rgba(0, 0, 0, 0.5);
  57. box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), inset 0 0 1px 1px rgba(255, 255, 255, 0.1), 0 2px 10px rgba(0, 0, 0, 0.5);
  58. }
  59.  
  60. .login > h1 {
  61. margin-bottom: 20px;
  62. font-size: 16px;
  63. font-weight: bold;
  64. color: white;
  65. text-align: center;
  66. text-shadow: 0 -1px rgba(0, 0, 0, 0.4);
  67. }
  68.  
  69. .login-input {
  70. display: block;
  71. width: 100%;
  72. height: 37px;
  73. margin-bottom: 20px;
  74. padding: 0 9px;
  75. color: white;
  76. text-shadow: 0 1px black;
  77. background: #2b3e5d;
  78. border: 1px solid #15243b;
  79. border-top-color: #0d1827;
  80. border-radius: 4px;
  81. background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0));
  82. background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0));
  83. background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0));
  84. background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0));
  85. -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.2);
  86. box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.2);
  87. }
  88.  
  89. .login-input:focus {
  90. outline: 0;
  91. background-color: #32486d;
  92. -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 4px 1px rgba(255, 255, 255, 0.6);
  93. box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 4px 1px rgba(255, 255, 255, 0.6);
  94. }
  95.  
  96. .lt-ie9 .login-input { line-height: 35px; }
  97.  
  98. .login-submit {
  99. display: block;
  100. width: 100%;
  101. height: 37px;
  102. margin-bottom: 15px;
  103. font-size: 14px;
  104. font-weight: bold;
  105. color: #294779;
  106. text-align: center;
  107. text-shadow: 0 1px rgba(255, 255, 255, 0.3);
  108. background: #adcbfa;
  109. background-clip: padding-box;
  110. border: 1px solid #284473;
  111. border-bottom-color: #223b66;
  112. border-radius: 4px;
  113. cursor: pointer;
  114. background-image: -webkit-linear-gradient(top, #d0e1fe, #96b8ed);
  115. background-image: -moz-linear-gradient(top, #d0e1fe, #96b8ed);
  116. background-image: -o-linear-gradient(top, #d0e1fe, #96b8ed);
  117. background-image: linear-gradient(to bottom, #d0e1fe, #96b8ed);
  118. -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.5), inset 0 0 7px rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.15);
  119. box-shadow: inset 0 1px rgba(255, 255, 255, 0.5), inset 0 0 7px rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.15);
  120. }
  121.  
  122. .login-submit:active {
  123. background: #a4c2f3;
  124. -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.4), 0 1px rgba(255, 255, 255, 0.1);
  125. box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.4), 0 1px rgba(255, 255, 255, 0.1);
  126. }
  127.  
  128. .login-help {
  129. text-align: center;
  130. }
  131.  
  132. .login-help > a {
  133. font-size: 11px;
  134. color: #d4deef;
  135. text-decoration: none;
  136. text-shadow: 0 -1px rgba(0, 0, 0, 0.4);
  137. }
  138.  
  139. .login-help > a:hover {
  140. text-decoration: underline;
  141. }
  142.  
  143. ::-moz-focus-inner {
  144. padding: 0;
  145. border: 0;
  146. }
  147.  
  148. :-moz-placeholder { color: #bcc0c8 !important; }
  149. ::-webkit-input-placeholder { color: #bcc0c8; }
  150. :-ms-input-placeholder { color: #bcc0c8 !important; }

URL: http://www.mobilescommunity.com/css/215128-facebook-login-form.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.