Published in: CSS
A starter CSS file that was bred from various style sheets, css techniques and standard practices I use. v.4: Added the @charset delaration at the top v.3: Converted to alpha/numeral notation. Now uses @media rule more effectively v.2: Consolidated sections 1 and 99 to shrink the file size. There is no need to change these sections except for the very last rule anyways.
@charset "utf-8"; /************************************/ /* Table of Contents /* /* A. Colors /* B. Screen Styles @media screen /* B.1 General /* B.2 /* B.3 /* C. Printer Styles @media print /* C.1 Printer Styles Reset /************************************/ /************************************/ /* A. Colors /* /************************************/ /************************************/ /* B. Screen Styles @media screen /************************************/ @media screen { /************************************/ /* B.1 General /************************************/ html, body, blockquote, code, div, dd, dl, dt, h1, h2, h3, h4, h5, h6, li, ol, p, pre, th, td, ul { margin:0; padding:0; } body { font-size:10px; } address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal; } caption, th { text-align:left; } code, h1, h2, h3, h4, h5, h6, pre { font-size:100%; } img { display:block; } ol, ul { list-style:none; } :link, :visited { text-decoration:none; } :focus, :active { outline:none; } a img, :link img, :visited img { border:none; } q:after, q:before{ content:''; } table{ border-collapse:collapse; border-spacing:0; } .clearfix { display:inline-table; height:1%; display:block; } html > body .clearfix { height:auto; } .clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } /************************************/ /* B.2 /************************************/ /************************************/ /* B.3 /************************************/ } /************************************/ /* C. Printer Styles @media print /************************************/ @media print { /************************************/ /* C.1 Printer Styles Reset /************************************/ body { background:#fff; font-size:12pt; } a:link, a:visited { color:#520; background:transparent; font-weight:bold; text-decoration:underline; } #content a:link:after, #content a:visited:after { content:" (" attr(href) ") "; font-size:90%; } #content a[href^="/"]:after { content:" (http://www.your-site-name.com" attr(href) ") "; } }
You need to login to post a comment.
