paperlined.org
dev > web > formats > css
document updated 16 years ago, on Mar 18, 2008
Bits of CSS that I use pretty frequently, but which don't spring to mind immediately, if all you've done is read the W3C spec.


Table has borders

        table {border-collapse:collapse}
        th, td {border:1px solid #aaa; padding:0.1em 0.3em}



Indent everything except for h1/h2/h3../'s (so there's sort of an "outline" look that makes it a
little faster to distinguish what's section-headers and what's section-content)

        body {margin-left:3%}
        h1,h2,h3,h4,h5 {margin-left:-2%}



Remove the space immediately below h1/h2/h3/.../'s

        h1,h2,h3,h4,h5 {margin-bottom:0}
        h3+ul, h3+ol, h3+pre /*...*/ {margin-top:0}