A reference for CSS goodness.
This cheatsheet is desinged for a quick search on CSS selectors:) There are so many CSS selectors with unfamiliar symbols,.,. + etc, so I am often confused with how CSS selectors work. I wish this infographic helps you find proper CSS selectors. Print this PDF out and stick it on the wall. A CSS rule set contains one or more selectors and one or more declarations. The selector (s), which in this example is h1, points to an HTML element. The declaration (s), which in this example are color: blue and text-align: center style the element with a property and value. The rule set is the main building block of a CSS sheet. Get my free CSS selector cheat sheet! Never struggle with tricky selectors again. Downloading the above cheat sheet will also add you to my weekly newsletter full of helpful tips and tricks! ' I simply love it, this is the best cheat sheet I've ever seen.
The 30 CSS Selectors you Must Memorize via Nettuts+ Child and Sibling Selectors via CSS-Tricks CSS3 Substring Matching Attribute Selectors via CSS3.info How To Use CSS3 Pseudo-Classes via Smashing Magazine Understanding:nth-child Pseudo-class Expressions via SitePoint Taming Advanced CSS Selectors via Smashing Magazine Share on Twitter.
Selectors
Pseudo Selectors & Elements
First Element of its Parent Selector
p:first-of-type {}
Text Styling
Font Weight
font-weight: normal | bold | bolder | lighter | 100 - 900
Vertical Alignment
vertical-align: baseline | 10px | sub | super | top | text-top | middle | bottom | text-bottom | initial
Text Transform
text-transform: capitalise | lowercase | uppercase
Space Between Characters
letter-spacing: normal | 4px
Horizontal Alignment
text-align: left | right | center | justify
Text Align Last
text-align-last: auto | left | right | center | justify | start | end | initial | inherit
Css Selectors Cheat Sheet Printable
Text Decoration
text-decoration: none | underline | overline | line-through
Text Justify
text-justify: auto | inter-word | inter-character | none | initial | inherit
Text Overflow
text-overflow: clip | ellipsis | string | initial | inherit
Text Shadow
text-shadow: h-shadow v-shadow blur-radius color | none | initial | inherit
Css Selectors Cheat Sheet Selenium Pdf
Position
Position
position: static | relative | absolute | fixed | sticky
Clear Floating Elements
clear: none | left | right | both
Background
Background Repeat
background-repeat: repeat-x | repeat-y | repeat | space | round | no-repeat
Background Attachment
background-attachment: scroll | fixed | local | initial | inherit
Background Position
background-position: top | right | bottom | left | center
Box Properties
Border Style
border-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
List Styling
List Type
list-style-type: disc | circle | square | none
List Position
list-style-position: inside | outside
Flexbox
Flex Direction
flex-direction: row | row-reverse | column | column-reverse
Justify Content
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly
Align Items
align-items: flex-start | flex-end | center | baseline | stretch
Align Content
align-content: flex-start | flex-end | center | space-between | space-around | stretch
Align Self
align-self: auto | flex-start | flex-end | center | baseline | stretch
CSS Grid
Grid Template Columns
grid-template-columns: 40px 50px auto 50px 40px
Grid Template Rows
grid-template-rows: 25% 100px auto
Grid Template Areas
grid-template-areas: 'a b c' | none
Grid Template
grid-template: 'a a a' 20% 'b b b' auto | 100px 1fr / 50px 1fr
Justify Items
justify-items: start | end | center | stretch
Align Items
align-items: start | end | center | stretch
Justify Content
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly
Align Content
align-content: flex-start | flex-end | center | space-between | space-around | stretch
Grid Auto Columns
Horizontal Alignment
text-align: left | right | center | justify
Text Align Last
text-align-last: auto | left | right | center | justify | start | end | initial | inherit
Css Selectors Cheat Sheet Printable
Text Decoration
text-decoration: none | underline | overline | line-through
Text Justify
text-justify: auto | inter-word | inter-character | none | initial | inherit
Text Overflow
text-overflow: clip | ellipsis | string | initial | inherit
Text Shadow
text-shadow: h-shadow v-shadow blur-radius color | none | initial | inherit
Css Selectors Cheat Sheet Selenium Pdf
Position
Position
position: static | relative | absolute | fixed | sticky
Clear Floating Elements
clear: none | left | right | both
Background
Background Repeat
background-repeat: repeat-x | repeat-y | repeat | space | round | no-repeat
Background Attachment
background-attachment: scroll | fixed | local | initial | inherit
Background Position
background-position: top | right | bottom | left | center
Box Properties
Border Style
border-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
List Styling
List Type
list-style-type: disc | circle | square | none
List Position
list-style-position: inside | outside
Flexbox
Flex Direction
flex-direction: row | row-reverse | column | column-reverse
Justify Content
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly
Align Items
align-items: flex-start | flex-end | center | baseline | stretch
Align Content
align-content: flex-start | flex-end | center | space-between | space-around | stretch
Align Self
align-self: auto | flex-start | flex-end | center | baseline | stretch
CSS Grid
Grid Template Columns
grid-template-columns: 40px 50px auto 50px 40px
Grid Template Rows
grid-template-rows: 25% 100px auto
Grid Template Areas
grid-template-areas: 'a b c' | none
Grid Template
grid-template: 'a a a' 20% 'b b b' auto | 100px 1fr / 50px 1fr
Justify Items
justify-items: start | end | center | stretch
Align Items
align-items: start | end | center | stretch
Justify Content
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly
Align Content
align-content: flex-start | flex-end | center | space-between | space-around | stretch
Grid Auto Columns
grid-auto-columns: 100px | max-content | min-content
Grid Auto Rows
grid-auto-rows: 100px | max-content | min-content
Grid Auto Flow
grid-auto-flow: row | column | row dense | column dense
Grid Column Start
grid-column-start: 2 | areaname | span 2 | span areaname | auto
Grid Column End
Css Selector Syntax
grid-column-end: 2 | areaname | span 2 | span areaname | auto
Grid Row Start
grid-row-start: 2 | areaname | span 2 | span areaname | auto
Grid Row End
grid-row-end: 2 | areaname | span 2 | span areaname | auto
Justify Self
justify-self: start | end | center | stretch
Align Self
align-self: start | end | center | stretch
Dynamic Content
Counter Increment
counter-increment: name-of-counter
Counter Dynamic Value
content: counter(name-of-counter)
Attribute Dynamic Value
content: attr(name-of-attribute)