0% found this document useful (0 votes)
10 views

Cheat Sheets css2

This document is a cheat sheet for CSS2 that provides descriptions and examples of different CSS2 properties, selectors, and other items across two pages. The cheat sheet covers topics like CSS2 selectors, sizes, positioning, colors, fonts, boxes, text, and tables among others.

Uploaded by

Pas DEN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Cheat Sheets css2

This document is a cheat sheet for CSS2 that provides descriptions and examples of different CSS2 properties, selectors, and other items across two pages. The cheat sheet covers topics like CSS2 selectors, sizes, positioning, colors, fonts, boxes, text, and tables among others.

Uploaded by

Pas DEN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CSS2 Cheat Sheet

by Dave Child (DaveChild) via cheatography.com/1/cs/14/

CSS2 Selectors CSS2 Sizes CSS2 Positioning

* All elements 0 0 requires no unit display clear

div <di​v> Relative Sizes position z-index

div * All elements within <di​v> em 1em equal to font size of parent (same top direction

div span <sp​an> within <di​v> as 100%) right unicod​e-bidi


ex Height of lower case "​x"
div, span <di​v> and <sp​an> bottom overflow

div > span <sp​an> with parent <di​v> % Percentage left clip

div + span <sp​an> preceded by <di​v> Absolute Sizes float visibility

.class Elements of class "​cla​ss" px Pixels

cm Centim​eters CSS2 Dimensions


div.class <di​v> of class "​cla​ss"

#itemid Element with id "​ite​mid​" mm Millim​eters width min-height


in Inches min-width max-height
div#itemid <di​v> with id "​ite​mid​"

a[attr] <a> with attribute "​att​r" pt 1pt = 1/72in max-width vertic​al-​align


pc 1pc = 12pt height
a[attr​='x'] <a> when "​att​r" is "​x"

a[clas​s~='x <a> when class is a list


CSS2 Colours CSS2 Colour and Background
'] containing 'x'

a[lang​|='en' <a> when lang begins "​en" #789abc RGB Hex Notation color backgr​oun​d-r​epeat
] #acf Equates to "​#aa​ccf​f" background backgr​oun​d-image
rgb(0,​25, Value of each of red, green, and backgr​oun​d-color backgr​oun​d-p​osition
CSS2 Pseudo Selectors and Pseudo Classes 50) blue. 0 to 255, may be swapped for
backgr​oun​d-a​tta​chment
percen​tages.
:first​-child First child element

:first​-line First line of element


CSS2 Box Model
:first​-letter First letter of element

:hover Element with mouse over

:active Active element

:focus Element with focus

:link Unvisited links

:visited Visited links

:lang(var) Element with language "​var​"

:before Before element

:after After element

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by Readability-Score.com


cheatography.com/davechild/ Last updated 14th May, 2014. Measure your website readability!
www.addedbytes.com Page 1 of 2. https://readability-score.com
CSS2 Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/14/

CSS2 Text CSS2 Paging

text-i​ndent word-s​pacing size page-b​rea​k-i​nside

text-align text-t​ran​sform marks page

text-d​eco​ration white-​space page-b​rea​k-b​efore orphans

text-s​hadow line-h​eight page-b​rea​k-after widows

letter​-sp​acing
CSS2 Interface

CSS2 Fonts cursor outlin​e-style

font font-w​eight outline outlin​e-color

font-f​amily font-s​tretch outlin​e-width

font-style font-size
CSS2 Aural
font-v​ariant font-s​ize​-adjust
volume elevation
CSS2 Boxes speak speech​-rate

margin border​-color pause voice-​family

margin-top border​-to​p-color pause-​before pitch

margin​-right border​-ri​ght​-color pause-​after pitch-​range

margin​-bottom border​-bo​tto​m-color cue stress

margin​-left border​-le​ft-​color cue-before richness

padding border​-style cue-after speak-​pun​ctu​ation

paddin​g-top border​-to​p-style play-d​uring speak-​numeral

paddin​g-right border​-ri​ght​-style azimuth

paddin​g-b​ottom border​-bo​tto​m-style
CSS2 Miscellaneous
paddin​g-left border​-le​ft-​style

border border​-width content list-s​tyl​e-type

border-top border​-to​p-width quotes list-s​tyl​e-image

border​-bottom border​-ri​ght​-width counte​r-reset list-s​tyl​e-p​osition

border​-right border​-bo​tto​m-width counte​r-i​ncr​ement marker​-offset

border​-left border​-le​ft-​width list-style

CSS2 Tables

captio​n-side border​-sp​acing

table-​layout empty-​cells

border​-co​llapse speak-​header

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by Readability-Score.com


cheatography.com/davechild/ Last updated 14th May, 2014. Measure your website readability!
www.addedbytes.com Page 2 of 2. https://readability-score.com

You might also like