#
) .
) ,
) *
) space
) >
) +
) ~
) Selector[Attribute]
Selector[Attribute = "Value"]
Selector[Attribute ~= "Value"]
Selector[Attribute |= "Value"]
Selector[Attribute ^= "Value"]
Selector[Attribute $= "Value"]
Selector[Attribute *= "Value"]
width
property sets the width of an elementmin-width
property defines the minimum width of an elementmax-width
property defines the maximum width of an elementheight
property sets the height of an elementmin-height
property defines the minimum height of an elementmax-height
property defines the maximum height of an elementpadding
defines space around an element's content, inside of any defined borderpadding: padding-top padding-right padding-bottom padding-left;
padding: padding-top padding-Horizontal padding-bottom;
padding: padding-Vertical padding-Horizontal;
padding: padding-All;
margin
property specifies space around elements, outside of any defined bordermargin: margin-top margin-right margin-bottom margin-left;
margin: margin-top margin-Horizontal margin-bottom;
margin: margin-Vertical margin-Horizontal;
margin: margin-All;
border-width
property specifies the width of an element's bordersborder-width: border-top-width border-right-width border-bottom-width border-left-width;
border-width: border-top-width border-Horizontal-width border-bottom-width;
border-width: border-Vertical-width border-Horizontal-width;
border-width: border-All-width;
border-style
property specifies the style of an element's bordersborder-style: border-top-style border-right-style border-bottom-style border-left-style;
border-style: border-top-style border-Horizontal-style border-bottom-style;
border-style: border-Vertical-style border-Horizontal-style;
border-style: border-All-style;
border-color
property specifies the color of an element's bordersborder-color: border-top-color border-right-color border-bottom-color border-left-color;
border-color: border-top-color border-Horizontal-color border-bottom-color;
border-color: border-Vertical-color border-Horizontal-color;
border-color: border-All-color;
border-radius
property defines the radius of the element's cornersborder-radius: border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius;
border-radius: border-top-left-radius border-Diagonal-Right-Left-radius border-bottom-right-radius;
border-radius: border-Diagonal-Left-Right-radius border-Diagonal-Right-Left-radius;
border-radius: border-All-radius;
outline-width
property specifies the width of an outline, drawn around elements, outside the bordersoutline-style
property specifies the style of an outline, drawn around elements, outside the bordersoutline-color
property specifies the color of an outline, drawn around elements, outside the bordersoutline-offset
property adds space between the outline and the edge or border of an elementbox-sizing
property defines how the width and height of an element are calculated in box dimensionsbox-shadow
property specifies one or multiple shadows to an elementbox-shadow: H-Offset V-Offset Blur-Radius Spread-Radius Color inset;
H-Offset
V-Offset
Blur-Radius
Spread-Radius
Color
inset
box-shadow: CSS Global Values;
box-shadow: CSS Length Values;
box-shadow: CSS Color Values;
box-shadow: currentColor;
box-shadow: transparent;
box-shadow: none;
width
vs. min-width
vs. max-width
width
property overrides the original width of the elementmin-width
overrides width
when min-width > width
max-width
overrides width
when max-width < width
min-width
is the most top priority followed by max-width, width
and the original width of the elementheight
vs. min-height
vs. max-height
height
property overrides the original height of the elementmin-height
overrides height
when min-height > height
max-height
overrides height
when max-height < height
min-height
is the most top priority followed by max-height, height
and the original height of the elementheight: auto;
)overflow
property on the container to manage overflowed contentsWidth Dimension = "border-left-width" + "padding-left" + "width" + "padding-right" + "border-right-width"
Height Dimension = "border-top-width" + "padding-top" + "height" + "padding-bottom" + "border-bottom-width"
outline
property does not affect the actual size box dimensions and may overlaps with other contentsbox-sizing: border-box;
property is the best practice to be used for box dimensionsmargin-top
and margin-bottom
collapsed into a single margin
that is equal to the largest of those two margins
margin-bottom: 20px;
and Element B has margin-top: 30px;
the vertical margin between Element A and Element B would be 30px
50px
( 20px
from Element A's bottom margin + 30px
from Element B's top margin),
the actual vertical margin is 30px
due to margin collapse
border: border-width border-style border-color;
border-width
and border-style
properties are requiredborder-color
is optional and when omitted, the border color applied will be the color of the textborder
property also can be written with side properties with their own shorthand property
border-top: border-top-width border-top-style border-top-color;
border-right: border-right-width border-right-style border-right-color;
border-bottom: border-bottom-width border-bottom-style border-bottom-color;
border-left: border-left-width border-left-style border-left-color;
outline: outline-width outline-style outline-color;
outline-width
and outline-style
properties are requiredoutline-color
is optional and when omitted, the outline color applied will be the color of the textposition
property specifies the type of positioning method used for an elementinset
property sets the distance between an element and the parent elementinset: top right bottom left;
inset: top Horizontal bottom;
inset: Vertical Horizontal;
inset: All;
float
property specifies whether an element should float to the left, right, or not at allclear
property specifies what should happen with the element that is next to a floating elementdisplay
property specifies the display behavior (the type of rendering box) of an elementflex-direction
property specifies the direction of the flexible itemsflex-wrap
property specifies whether the flexible items should wrap or notflex-grow
property specifies how much the item will grow relative to the rest of the flexible items inside the same containerflex-shrink
property specifies how the item will shrink relative to the rest of the flexible items inside the same containerflex-basis
property specifies the initial length of a flexible itemorder
property specifies the order of a flexible item relative to the rest of the flexible items inside the same containergrid-template-rows
property specifies the number (and the heights) of the rows in a grid layoutgrid-template-columns
property specifies the number (and the widths) of columns in a grid layoutgrid-row-start
property defines on which row-line the item will startgrid-column-start
property defines on which column-line the item will startgrid-row-end
property defines how many rows an item will span, or on which row-line the item will endgrid-column-end
property defines how many columns an item will span, or on which column-line the item will endalign-content
property applied on container which specifies how "item lines" are distributed along the cross axis in a containerjustify-content
property applied on container which aligns the items when they do not use all available space on the main-axis (horizontally)align-items
property applied on container which specifies the default alignment for items inside a containerjustify-items
property is set on the grid container to give child elements (grid items) alignment in the inline directionalign-self
property specifies the alignment in the block direction for the selected item inside a containerjustify-self
property applied on items which aligns a grid item within its grid cell in the inline directionvertical-align
property sets the vertical alignment of an elementz-index
property specifies the stack order of an elementposition
and inset
position
and inset
properties togetherleft
property is more priority than right
propertytop
property is more priority than bottom
propertyfloat
and clear
float
and clear
properties togetherdisplay: flex; flex-flow: flex-direction flex-wrap;
flex: flex-grow flex-shrink flex-basis; order: myValue;
display: grid; grid: grid-template-rows / grid-template-columns grid-template-areas grid-auto-rows grid-auto-columns grid-auto-flow;
grid-template: grid-template-rows / grid-template-columns grid-template-areas;
grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end;
grid-row: grid-row-start / grid-row-end;
grid-column: grid-column-start / grid-column-end;
place-content: align-content justify-content;
place-items: align-items justify-items;
place-self: align-self justify-self;
animation-name: myValue;
animation-name
property specifies a name for the @keyframes
animationCSS Global Values
Strings
( Any custom name for the animation )none
( A default value which there is no animation name specified )animation-duration: myValue;
animation-duration
property defines how long an animation should take to complete one cycleCSS Global Values
CSS Time Values
( Written in millisecond, ms
or second, s
)0
( A default value which there is no duration specified for the animation )animation-timing-function: myValue;
animation-timing-function
specifies the speed curve of an animationCSS Global Values
ease
( A default value which the animation has a slow start, then fast, before it ends slowly )cubic-bezier(n, n, n, n)
ease-in
( The animation has a slow start )ease-out
( The animation has a slow end )ease-in-out
( The animation has both a slow start and a slow end )linear
( The animation has the same speed from start to end )steps(int, start|end)
step-start
( Equivalent to steps(1, start)
)step-end
( Equivalent to steps(1, end)
)animation-delay: myValue;
animation-delay
property specifies a delay for the start of an animationCSS Global Values
CSS Time Values
( Written in millisecond, ms
or second, s
)0
( A default value which there is no delay specified for the animation )animation-iteration-count: myValue;
animation-iteration-count
property specifies the number of times an animation should be playedCSS Global Values
Numbers
( Any numbers which defines how many times an animation should be played )1
( A default value which defines how many times an animation should be played )animation-direction: myValue;
animation-direction
property defines whether an animation should be played forward, backward or in alternate cyclesCSS Global Values
normal
( A default value which the animation is played as normal, forwards )reverse
( The animation is played in reverse direction, backwards )alternate
( The animation is played forwards first, then backwards )alternate-reverse
( The animation is played backwards first, then forwards )animation-fill-mode: myValue;
animation-fill-mode
property specifies a style for the element when the animation is not playing (before it starts, after it ends, or both)animation-fill-mode
property can override this behaviorCSS Global Values
none
( A default value which the animation will not apply any styles to the element before or after it is executing )backwards
( The element will get the style values that is set by the first keyframe, depends on animation-direction
, and
retain this during the animation-delay
period )
both
( The animation will follow the rules for both forwards and backwards, extending the animation properties in both directions )forwards
( The element will retain the style values that is set by the last keyframe, depends on animation-direction
and
animation-iteration-count
)
animation-play-state: myValue;
animation-play-state
property specifies whether the animation is running or pausedCSS Global Values
paused
( Specifies that the animation is paused )running
( A default value which specifies that the animation is running )transition-property: myValue;
transition-property
property specifies the name of the CSS property the transition effect is forCSS Global Values
all
( A default value which all properties will get a transition effect )none
( No property will get a transition effect )transition-duration: myValue;
transition-duration
property specifies how long a transition effect takes to completeCSS Global Values
CSS Time Values
( Written in millisecond, ms
or second, s
)transition-timing-function: myValue;
transition-timing-function
property specifies the speed curve of the transition effectCSS Global Values
ease
cubic-bezier(n, n, n, n)
ease-in
ease-out
ease-in-out
linear
step-end
( Equivalent to steps(1, end) )
step-start
( Equivalent to steps(1, start) )
steps(int, start|end)
transition-delay: myValue;
transition-delay
property specifies when the transition effect will startCSS Global Values
CSS Time Values
( Written in millisecond, ms
or second, s
)color
property specifies the color of textfont-style
property specifies the font style for a textfont: font-style font-variant font-weight font-size/line-height font-family;
font-variant: myValue;
font-variant
property specifies whether or not a text should be displayed in a small-caps fontCSS Global Values
normal
( A default value which the browser displays a normal font )font-weight: myValue;
font-weight
property sets how thick or thin characters in text should be displayedCSS Global Values
normal
( A Default value which displays normal characters )font-size: myValue;
font-size
property sets the size of a fontCSS Global Values
CSS Length Values
medium
( A default value which the font is set to a medium size )line-height: myValue;
line-height
property specifies the height of a lineCSS Global Values
CSS Length Values
normal
( A default value which line height is sets to normal )font-family: myValues;
font-family
property specifies the font for an elementfont-family
property can hold several font namesstyle
attribute in HTMLtimes, courier, arial
, etc.serif, sans-serif, cursive, fantasy, monospace
, etc.CSS Global Values
Arial
'Arial Narrow'
'Arial Narrow Bold'
Calibri
Cambria
Cochin
Courier
'Courier New'
cursive
fantasy
'Franklin Gothic Medium'
Geneva
Georgia
'Gill Sans'
'Gill Sans MT'
Haettenschweiler
Helvetica
Impact
'Lucida Grande'
'Lucida Sans'
'Lucida Sans Regular'
'Lucida Sans Unicode'
monospace
sans-serif
'Segoe UI'
serif
Tahoma
Times
'Times New Roman'
'Trebuchet MS'
Verdana
font-kerning
font-kerning
property controls the usage of the kerning information stored in a fontCSS Global Values
auto
( A default value which the browser determines whether font kerning should be applied or not )normal
( Specifies that font kerning is applied )none
( Specifies that font kerning is not applied )text-align: myValue;
text-align
property specifies the horizontal alignment of text in an elementCSS Global Values
left
( A default value where the text align is on the left when direction: ltr;
)right
( A default value where the text align is on the right when direction: ltr;
)center
( Text align is centered ) justify
( Stretches the lines so that each line has equal width, like in newspapers and magazines )text-align-last: myValue;
text-align-last
property specifies how to align the last line of a texttext-align-last
property sets the alignment for all last lines within the selected elementCSS Global Values
auto
( A default value where the last line is justified and aligned left )text-decoration: text-decoration-line text-decoration-color text-decoration-style text-decoration-thickness;
text-decoration-line: myValue;
text-decoration-line
property sets the kind of text decoration to useCSS Global Values
none
( A default value which there is no text decoration line specified )text-decoration-color: myValue;
text-decoration-color
property specifies the color of the text-decorationCSS Global Values
CSS Color Values
currentColor
( A default value where the text decoration color is based on the value of the color
property of the element )text-decoration-style: myValue;
text-decoration-style
property sets the style of the text decorationCSS Global Values
solid
( A default value which the line will display as a single line )text-decoration-thickness: myValue;
text-decoration-thickness
property specifies the thickness of the decoration lineCSS Global Values
CSS Length Values
auto
(A default value which the browser automatically chooses the thickness of the decoration line )text-emphasis: text-emphasis-style text-emphasis-color;
text-emphasis-style: myValue;
text-emphasis-style
property sets the style of emphasis marksCSS Global Values
'Strings'
( The emphasis marks are the given string, one character )none
( A default value which no emphasis marks are applied )text-emphasis-color: myValue;
text-emphasis-color
property sets the color of emphasis marksCSS Global Values
CSS Color Values
currentColor
( A default value where the text emphasis color is based on the value of the color
property of the element )text-emphasis-position: myValue;
text-emphasis-position
property specifies the position of the emphasis marksCSS Global Values
over
( The emphasis marks are applied over the text in horizontal writing mode )under
( The emphasis marks are applied under the text in horizontal writing mode )left
( The emphasis marks are applied to the left of the text in vertical writing mode )right
( The emphasis marks are applied to the right of the text in vertical writing mode )text-indent: myValue;
text-indent
property specifies the indentation of the first line in a text-blockCSS Global Values
CSS Length Values
0
( A default value where there is no text indentation )text-justify: myValue;
text-justify
property specifies the justification method of text when text-align: justify;
CSS Global Values
auto
( A default value where the browser determines the justification algorithm )text-orientation: myValue;
text-orientation
property specifies the orientation of charactersCSS Global Values
mixed
( A default value where characters are rotated 90 degrees clockwise )text-overflow: myValue;
text-overflow
property specifies how overflowed content that is not displayed should be signaled to the userCSS Global Values
Strings
( Render the given string to represent the clipped text )clip
( A default value where the text is clipped and not accessible )text-shadow: H-Offset V-Offset Blur-Radius Color;
text-shadow
property adds shadow to textH-Offset
V-Offset
Blur-Radius
Color
text-transform: myValue;
text-transform
property controls the capitalization of textCSS Global Values
none
( A default value which there is no capitalization )text-underline-offset: myValue;
text-underline-offset
property specifies the offset distance of underline text decorationsCSS Global Values
CSS Length Values
auto
( A default value which the browser sets the appropriate offset for the underline )text-underline-position: myValue;
text-underline-position
property specifies the position of underline text decorationsCSS Global Values
auto
( A default value which the browser sets the position of the underline )letter-spacing: myValue;
letter-spacing
property increases or decreases the space between characters in a textCSS Global Values
CSS Length Values
normal
( A default value which defines normal space between characters )direction: myValue;
direction
property specifies the text direction/writing direction within a block-level elementCSS Global Values
ltr
( A default value which text direction goes from left-to-right )rtl
( Text direction goes from right-to-left )unicode-bidi: myValue;
unicode-bidi
property specifies whether the text should be overridden to support multiple languages in the same documentunicode-bidi
property is used together with the direction
propertyCSS Global Values
normal
( A default value which the element does not open an additional level of embedding )white-space: myValue;
white-space
property specifies how white-space inside an element is handledCSS Global Values
normal
word-break: myValue;
word-break
property specifies how words should break when reaching the end of a lineCSS Global Values
normal
( A default value which uses default line break rules )word-spacing: myValue;
word-spacing
property increases or decreases the white space between wordsCSS Global Values
CSS Length Values
normal
( A default value which defines normal space between words, around 0.25em
)word-wrap: myValue;
word-wrap
property allows long words to be able to be broken and wrap onto the next lineCSS Global Values
normal
( A default value which break words only at allowed break points )writing-mode: myValue;
writing-mode
property specifies whether lines of text are laid out horizontally or verticallyCSS Global Values
horizontal-tb
( Let the content flow horizontally from left to right, vertically from top to bottom )sideways-lr
sideways-rl
vertical-lr
( Let the content flow vertically from top to bottom, horizontally from left to right )vertical-rl
( Let the content flow vertically from top to bottom, horizontally from right to left )tab-size: myValue;
tab-size
property specifies the width of a tab characterCSS Global Values
CSS Length Values
8
( A default value which the number of space-characters to be displayed for each tab-character )hyphens: myValue;
hyphens
property defines whether hyphenation is allowed to create more soft wrap opportunities within a line of textCSS Global Values
manual
( A default value which Words are only hyphenated at ‐
or
, if needed )hyphenate-character: myValue;
hyphenate-character
property defines the character used at the end of line, before a hyphenation breakCSS Global Values
Strings
( The character used at the end of line, before a hyphenation break )auto
( A default value which the browser selects an appropriate character based on the current typographic conventions )INSIGHTS:
Arial, Helvetica, sans-serif
Cambria, Cochin, Georgia, Times, 'Times New Roman', serif
'Courier New', Courier, monospace
'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif
Georgia, 'Times New Roman', Times, serif
'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif
'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif
'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
'Times New Roman', Times, serif
'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif
Verdana, Geneva, Tahoma, sans-serif
text-align-last
property works
<div>
with three <p>
in it, text-align-last
will apply to the last line of each of the paragraphs:last-child
pseudo-class to apply text-align-last
on only the last paragraph in the containertext-overflow
is working
white-space: nowrap;
and overflow: hidden;
@media not|only Media Type and (Media Feature and|or|not Media Feature) {CSS Codes;}
@media
MediaType
screen
print
MediaFeature
orientation: landscape|portrait
min-width: Screen Size
max-width: Screen Size
and
or
not
only
Breakpoints
X-Small = Screen Size ≤ 575px
Small = Screen Size ≥ 576px
Medium = Screen Size ≥ 768px
Large = Screen Size ≥ 992px
X-Large = Screen Size ≥ 1200px
XX-Large = Screen Size ≥ 1400px
INSIGHTS:
@media
rule
@media
rule at the very bottom of the CSS codes