CSS HTML5 BoilerPlate


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

Boiler Plate with base styles and resets inlcuded


Copy this code and paste it in your HTML
  1. /* HTML5 ✰ Boilerplate */
  2.  
  3. html, body, div, span, object, iframe,
  4. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  5. abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
  6. small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
  7. fieldset, form, label, legend,
  8. table, caption, tbody, tfoot, thead, tr, th, td,
  9. article, aside, canvas, details, figcaption, figure,
  10. footer, header, hgroup, menu, nav, section, summary,
  11. time, mark, audio, video {
  12. margin: 0;
  13. padding: 0;
  14. border: 0;
  15. font-size: 100%;
  16. font: inherit;
  17. vertical-align: baseline;
  18. }
  19.  
  20. article, aside, details, figcaption, figure,
  21. footer, header, hgroup, menu, nav, section {
  22. display: block;
  23. }
  24.  
  25. blockquote, q { quotes: none; }
  26. blockquote:before, blockquote:after,
  27. q:before, q:after { content: ''; content: none; }
  28. ins { background-color: #ff9; color: #000; text-decoration: none; }
  29. mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
  30. del { text-decoration: line-through; }
  31. abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
  32. table { border-collapse: collapse; border-spacing: 0; }
  33. hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
  34. input, select { vertical-align: middle; }
  35.  
  36. body { font:13px/1.231 sans-serif; *font-size:small; }
  37. select, input, textarea, button { font:99% sans-serif; }
  38. pre, code, kbd, samp { font-family: monospace, sans-serif; }
  39.  
  40. html { overflow-y: scroll; }
  41. a:hover, a:active { outline: none; }
  42. ul, ol { margin-left: 2em; }
  43. ol { list-style-type: decimal; }
  44. nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
  45. small { font-size: 85%; }
  46. strong, th { font-weight: bold; }
  47. td { vertical-align: top; }
  48.  
  49. sub, sup { font-size: 75%; line-height: 0; position: relative; }
  50. sup { top: -0.5em; }
  51. sub { bottom: -0.25em; }
  52.  
  53. pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
  54. textarea { overflow: auto; }
  55. .ie6 legend, .ie7 legend { margin-left: -7px; }
  56. input[type="radio"] { vertical-align: text-bottom; }
  57. input[type="checkbox"] { vertical-align: bottom; }
  58. .ie7 input[type="checkbox"] { vertical-align: baseline; }
  59. .ie6 input { vertical-align: text-bottom; }
  60. label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
  61. button, input, select, textarea { margin: 0; }
  62. input:valid, textarea:valid { }
  63. input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
  64. .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
  65.  
  66. ::-moz-selection{ background: #607890; color:#fff; text-shadow: none; }
  67. ::selection { background:#607890; color:#fff; text-shadow: none; }
  68. a:link { -webkit-tap-highlight-color: #607890; }
  69.  
  70. button { width: auto; overflow: visible; }
  71. .ie7 img { -ms-interpolation-mode: bicubic; }
  72.  
  73. body, select, input, textarea { color: #444; }
  74. h1, h2, h3, h4, h5, h6 { font-weight: bold; }
  75. a, a:active, a:visited { color: #607890; }
  76. a:hover { color: #036; }
  77.  
  78. /*
  79. The simpler Grid from Nick La (http://webdesignerwall.com/about)
  80. http://www.webdesignerwall.com/demo/simpler-grid/940grid.html
  81. */
  82.  
  83. .container {
  84. width: 978px;
  85. margin: 0 auto;
  86. padding: 10px;
  87. }
  88.  
  89. .row {
  90. width: 987px;
  91. margin: 0 auto;
  92. overflow: hidden;
  93. }
  94.  
  95. .col1, .col2, .col3, .col4, .col5, .col6, .col7, .col8, .col9, .col10, .col11 {
  96. margin-right: 30px;
  97. float: left;
  98. }
  99.  
  100. .col1 {
  101. width: 54px;
  102. }
  103.  
  104. .col2 {
  105. width: 138px;
  106. }
  107.  
  108. .col3 {
  109. width: 222px;
  110. }
  111.  
  112. .col4 {
  113. width: 306px;
  114. }
  115.  
  116. .col5 {
  117. width: 390px;
  118. }
  119.  
  120. .col6 {
  121. width: 474px;
  122. }
  123.  
  124. .col7 {
  125. width: 558px;
  126. }
  127.  
  128. .col8 {
  129. width: 642px;
  130. }
  131.  
  132. .col9 {
  133. width: 726px;
  134. }
  135.  
  136. .col10 {
  137. width: 810px;
  138. }
  139.  
  140. .col11 {
  141. width: 894px;
  142. }
  143.  
  144. .last {
  145. margin-right: 0px;
  146. }
  147.  
  148. img, object, embed {
  149. max-width: 100%;
  150. }
  151.  
  152. /* Primary Styles
  153. Author:
  154. */
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162. /* nonsemantic helper classes */
  163.  
  164. .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
  165. .hidden { display: none; visibility: hidden; }
  166. .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
  167. .visuallyhidden.focusable:active,
  168. .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
  169. .invisible { visibility: hidden; }
  170. .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
  171. .clearfix:after { clear: both; }
  172. .clearfix { zoom: 1; }
  173.  
  174.  
  175. /* media-queries | ovverride to primary styles for other media / (devices) */
  176.  
  177. @media all and (orientation:portrait) {
  178.  
  179. }
  180.  
  181. @media all and (orientation:landscape) {
  182.  
  183. }
  184.  
  185. @media screen and (max-device-width: 480px) {
  186.  
  187. /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
  188. }
  189.  
  190.  
  191. @media print {
  192. * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
  193. -ms-filter: none !important; }
  194. a, a:visited { color: #444 !important; text-decoration: underline; }
  195. a[href]:after { content: " (" attr(href) ")"; }
  196. abbr[title]:after { content: " (" attr(title) ")"; }
  197. .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
  198. pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  199. thead { display: table-header-group; }
  200. tr, img { page-break-inside: avoid; }
  201. @page { margin: 0.5cm; }
  202. p, h2, h3 { orphans: 3; widows: 3; }
  203. h2, h3{ page-break-after: avoid; }
  204. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.