Css Selectors Cheat Sheet

broken image


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
Css

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
Selector

Grid Template

grid-template: 'a a a' 20% 'b b b' auto | 100px 1fr / 50px 1fr
Css selectors cheat sheet mdn

Justify Items

justify-items: start | end | center | stretch
Selectors

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

Css

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)

CSS Properties

align-contentalign-itemsalign-selfallanimationanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-timing-functionbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-clipbackground-colorbackground-imagebackground-originbackground-positionbackground-repeatbackground-sizeborderborder-bottomborder-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-styleborder-bottom-widthborder-collapseborder-colorborder-imageborder-image-outsetborder-image-repeatborder-image-sliceborder-image-sourceborder-image-widthborder-leftborder-left-colorborder-left-styleborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottombox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidecaption-sidecaret-color@charsetclearclipclip-pathcolorcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnscontentcounter-incrementcounter-resetcursordirectiondisplayempty-cellsfilterflexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloatfont@font-facefont-familyfont-feature-settingsfont-kerningfont-sizefont-size-adjustfont-stretchfont-stylefont-variantfont-variant-capsfont-weightgapgridgrid-areagrid-auto-columnsgrid-auto-flowgrid-auto-rowsgrid-columngrid-column-endgrid-column-gapgrid-column-startgrid-gapgrid-rowgrid-row-endgrid-row-gapgrid-row-startgrid-templategrid-template-areasgrid-template-columnsgrid-template-rowshanging-punctuationheighthyphens@importisolationjustify-content@keyframesleftletter-spacingline-heightlist-stylelist-style-imagelist-style-positionlist-style-typemarginmargin-bottommargin-leftmargin-rightmargin-topmax-heightmax-width@mediamin-heightmin-widthmix-blend-modeobject-fitobject-positionopacityorderoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-xoverflow-ypaddingpadding-bottompadding-leftpadding-rightpadding-toppage-break-afterpage-break-beforepage-break-insideperspectiveperspective-originpointer-eventspositionquotesresizerightrow-gapscroll-behaviortab-sizetable-layouttext-aligntext-align-lasttext-decorationtext-decoration-colortext-decoration-linetext-decoration-styletext-indenttext-justifytext-overflowtext-shadowtext-transformtoptransformtransform-origintransform-styletransitiontransition-delaytransition-durationtransition-propertytransition-timing-functionunicode-bidiuser-selectvertical-alignvisibilitywhite-spacewidthword-breakword-spacingword-wrapwriting-modez-index




broken image