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

CSS2 Cheat Sheet: by Via

This document provides a summary of CSS2 selectors, properties, and values in a condensed cheat sheet format. It lists over 50 different CSS2 selectors and pseudo-classes and their meanings. It also outlines over 50 CSS2 properties and values related to styling text, fonts, colors, backgrounds, positioning, sizing, and more. The cheat sheet aims to provide a concise reference to the essential information for CSS2.

Uploaded by

jamesm66
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

CSS2 Cheat Sheet: by Via

This document provides a summary of CSS2 selectors, properties, and values in a condensed cheat sheet format. It lists over 50 different CSS2 selectors and pseudo-classes and their meanings. It also outlines over 50 CSS2 properties and values related to styling text, fonts, colors, backgrounds, positioning, sizing, and more. The cheat sheet aims to provide a concise reference to the essential information for CSS2.

Uploaded by

jamesm66
Copyright
© Attribution Non-Commercial (BY-NC)
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 * div div * div span div, span div > span div + span .class div.class #itemid div#itemid a[attr] a[attr='x'] a[class~='x'] a[lang|='en'] All elements <div> All elements within <div> <span> within <div> <div> and <span> <span> with parent <div> <span> preceded by <div> Elements of class "class" <div> of class "class" Element with id "itemid" <div> with id "itemid" <a> with attribute "attr" <a> when "attr" is "x" <a> when class is a list containing 'x' <a> when lang begins "en" CSS2 Positioning display position top right CSS2 Pseudo Selectors and Pseudo Classes :first-child :first-line :first-letter :hover :active :focus :link :visited :lang(var) :before :after CSS2 Sizes 0 0 requires no unit First child element First line of element First letter of element Element with mouse over Active element Element with focus Unvisited links Visited links Element with language "var" Before element After element CSS2 Colour and Background color background background-color background-attachment CSS2 Text text-indent text-align text-decoration text-shadow letter-spacing CSS2 Fonts font font-family font-style font-variant CSS2 Colours #789abc #acf rgb(0,25,50) RGB Hex Notation Equates to "#aaccff" Value of each of red, green, and blue. 0 to 255, may be swapped for percentages. font-weight font-stretch font-size font-size-adjust CSS2 Miscellaneous content quotes counter-reset counter-increment list-style-type list-style-image list-style-position marker-offset word-spacing text-transform white-space line-height background-repeat background-image background-position CSS2 Interface cursor outline outline-width CSS2 Aural volume speak pause pause-before pause-after cue cue-before cue-after play-during azimuth elevation speech-rate voice-family pitch pitch-range stress richness speak-punctuation speak-numeral outline-style outline-color CSS2 Dimensions width min-width max-width height min-height max-height vertical-align CSS2 Paging size marks page-break-before page-break-after page-break-inside page orphans widows bottom left float clear z-index direction unicode-bidi overflow clip visibility CSS2 Tables caption-side table-layout border-collapse border-spacing empty-cells speak-header CSS2 Box Model CSS2 Boxes margin margin-top margin-right margin-bottom margin-left padding padding-top padding-right padding-bottom padding-left border border-top border-bottom border-right border-left border-color border-top-color border-right-color border-bottom-color border-left-color border-style border-top-style border-right-style border-bottom-style border-left-style border-width border-top-width border-right-width border-bottom-width border-left-width

Relative Sizes em 1em equal to font size of parent (same as 100%) ex % Height of lower case "x" Percentage

Absolute Sizes px cm mm in pt pc Pixels Centimeters Millimeters Inches 1pt = 1/72in 1pc = 12pt

percentages.

list-style Cheat Sheet This cheat sheet was published on 19th October, 2011 and was last updated on 6th December, 2011. Sponsor Envoy, for simple and effective bug management. Try it free! http://www.envoyapp.com

Cheatographer Dave Child (DaveChild) cheatography.com/davechild/ www.addedbytes.com

You might also like