Skip to content

Instantly share code, notes, and snippets.

@rwbaker
Created October 17, 2011 01:46
Show Gist options
  • Save rwbaker/1291745 to your computer and use it in GitHub Desktop.
Save rwbaker/1291745 to your computer and use it in GitHub Desktop.
CSS: Basic CSS starter
/* Default Styles
-------------------------------------------------------------------------------------*/
body {margin:0; font:14px/1.4 Arial, Tahoma, sans-serif; background:#fff; color:#333;}
/* Generics */
.hide {display:none;}
.left {float:left;}
.right {float:right;}
/* Text Styles */
h1,h2,h3,h4,h4,h5,h6{margin:.6em 0; font-weight:bold;}
h1 {font-size:2.0em}
h2 {font-size:1.8em}
h3 {font-size:1.6em}
h4 {font-size:1.4em}
h5 {font-size:1.2em;}
h6 {font-size:0.9em;}
h5,h6 {text-transform:uppercase;}
/* Link Styles */
a {color:#008EC4;}
/* Element Styles */
hr {border-color:#ddd; border-style:solid; border-width:1px 0 0; clear:both; height:0; margin:10px 0;}
b,strong {font-weight:bold;}
em,dfn {font-style:italic;}
b.red,strong.red {color:#d11d1d;}
acronym,abbr {border-bottom:1px dashed #999; color:#666; text-transform:uppercase;}
cite {border-bottom:1px dashed #999;}
blockquote {border-left:3px solid #ccc; padding-left:5px; margin-left:30px;}
p {margin-bottom:1em;}
p:last-child {margin-bottom:0;}
small {font-size:.8em;}
pre {margin:1.5em 0; white-space:pre; overflow:scroll; overflow-y:hidden; padding:.5em;}
pre,code,tt {font:12px 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; line-height:1; background:#fff; border:1px solid #eee;}
pre.noscroll {overflow:visible; padding-bottom:0;}
fieldset {border:1px solid #ccc; background:#fafafa; border-radius:5px; position:relative; padding:40px 10px 20px;}
fieldset legend {font-weight:bold; padding:0 10px 5px; background:#fff; border:1px solid #ccc; border-top:0px; position:absolute; top:-1px; left:10px;}
/* Lists */
ol.default {list-style-type:decimal;}
ul.default {list-style-type:disc;}
.default li {margin-left:30px;}
ol.reset,ul.reset {list-style-type:none; margin:0; padding:0;}
.reset li {margin:0;}
/* Piped list */
ul.pipe {display:block; clear:both; float:none; overflow:hidden;}
ul.pipe li {float:left; padding:2px 8px;}
ul.pipe li+li {border-left:1px dashed #ccc;}
ul.pipe li a {}
/* Image Styles */
img.left {float:left; margin:0 1em .5em 0;}
img.right {float:right; margin:0 0 .5em 1em;}
/* Table */
.datatable {border-collapse:collapse;}
.datatable.fullwidth {width:100%;}
.datatable tbody tr:hover {background:#eee;}
.datatable th, .datatable td {padding:0 3px;}
.datatable th {border-bottom:3px solid #aaa; text-align:left; font-weight:bold;}
.datatable td {padding:3px 3px; border-bottom:1px solid #ddd;}
.datatable tr.alt {}
/* Definition List */
dt {font-weight:bold;}
dd {margin-left:1.5em;}
dl.one-line dt {width:40px; float:left;}
dl.one-line dd {margin-left:45px;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment