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

CSS2 Cheat Sheet: by Via

This document provides a cheat sheet for CSS2 selectors, properties, and values. It includes summaries of CSS2 modules like positioning, sizing, colors, fonts, boxes, tables, and paging. The cheat sheet acts as a quick reference guide for the various components of CSS2.

Uploaded by

Carlos Cerna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

CSS2 Cheat Sheet: by Via

This document provides a cheat sheet for CSS2 selectors, properties, and values. It includes summaries of CSS2 modules like positioning, sizing, colors, fonts, boxes, tables, and paging. The cheat sheet acts as a quick reference guide for the various components of CSS2.

Uploaded by

Carlos Cerna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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

display

clear

div

<div>

Relative Sizes

position

z-index

div *

All elements within <div>

em

1em equal to font size of parent (same

top

direction

as 100%)

right

unicode-bidi

bottom

overflow

left

clip

float

visibility

div span

<span> within <div>

0 requires no unit

ex

Height of lower case "x"

<span> with parent <div>

Percentage

<span> preceded by <div>

Absolute Sizes

.class

Elements of class "class"

px

Pixels

div.class

<div> of class "class"

cm

Centimeters

CSS2 Dimensions

#itemid

Element with id "itemid"

mm

Millimeters

width

min-height

div#itemid

<div> with id "itemid"

in

Inches

min-width

max-height

a[attr]

<a> with attribute "attr"

pt

1pt = 1/72in

max-width

vertical-align

a[attr='x']

<a> when "attr" is "x"

pc

1pc = 12pt

height

a[class~='x

<a> when class is a list

']

containing 'x'

a[lang|='en'

<a> when lang begins "en"

div, span
div > span
div + span

<div> and <span>

]
CSS2 Pseudo Selectors and Pseudo Classes
:first-child

First child element

:first-line

First line of element

:first-letter

First letter of element

:hover

CSS2 Colours

CSS2 Colour and Background

#789abc

RGB Hex Notation

color

background-repeat

#acf

Equates to "#aaccff"

background

background-image

rgb(0,25,

Value of each of red, green, and

background-color

background-position

50)

blue. 0 to 255, may be swapped for


percentages.

CSS2 Box Model

background-attachment
CSS2 Text
text-indent

word-spacing

Element with mouse over

text-align

text-transform

:active

Active element

text-decoration

white-space

:focus

Element with focus

text-shadow

line-height

:link

Unvisited links

letter-spacing

:visited

Visited links

:lang(var)

Element with language "var"

CSS2 Fonts

:before

Before element

font

font-weight

:after

After element

font-family

font-stretch

font-style

font-size

font-variant

font-size-adjust

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 Boxes

CSS2 Aural

margin

border-color

volume

elevation

margin-top

border-top-color

speak

speech-rate

margin-right

border-right-color

pause

voice-family

margin-bottom

border-bottom-color

pause-before

pitch

margin-left

border-left-color

pause-after

pitch-range

padding

border-style

cue

stress

padding-top

border-top-style

cue-before

richness

padding-right

border-right-style

cue-after

speak-punctuation

padding-bottom

border-bottom-style

play-during

speak-numeral

padding-left

border-left-style

azimuth

border

border-width

border-top

border-top-width

border-bottom

border-right-width

content

list-style-type

border-right

border-bottom-width

quotes

list-style-image

border-left

border-left-width

counter-reset

list-style-position

counter-increment

marker-offset

CSS2 Tables

CSS2 Miscellaneous

list-style

caption-side

border-spacing

table-layout

empty-cells

border-collapse

speak-header

CSS2 Paging
size

page-break-inside

marks

page

page-break-before

orphans

page-break-after

widows

CSS2 Interface
cursor

outline-style

outline

outline-color

outline-width

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