CSS Course
CSS Course
CSS
E World Best CSS Course
COURSE
Ever
COURSE
TOPICS
BASICS ADVANCED PRO LEV EL
HTML
C SS
JAVASCRIP
T
Styles and designs
the appearance of
Provides the the webpage Adds interactivity
structure and
and dynamic
content of a
behavior to the
webpage.
webpage.
REAL
Cascading Style
WORLD
EXAMPL
Sheets
E
0
1
What is
CSS?
CS
Cascading Style
Sheets
S
Subscribe Thapa Technic
S hee
Styl
Cascading e t s
What is
CSS?
• Cascading Style Sheets (CSS) is a stylesheet language used to describe
the look & presentation of a document written in HTML or XML. It
defines how elements are displayed on a web page.
• Regular updates and new versions ensure CSS remains relevant and
adaptable to
changing web design needs.
CSS History
(Version)
CSS1 (1996)
0
Limited properties and
1 selectors.
CSSfi (1998)
CSS to 0
CSS 2 was released and work on CSS 3
2
CSS3 began
Internal CSS
3 0
Styles defined within the <style> tag
2
Ways within the
HTML document's <head>.
External CSS
0
Styles stored in separate .css files linked
3 to the HTML document using the <link>
element.
0
4
Types
of
Selector
s
CSS Tag / Element
Selector
Selecto
r
Valu
h1 { e
color: red;
Propert font-size: 32px;
y
}
Class Selector – HTML /
CSS Class-Selector
<section>
<button class="btn">
Subscribe Thapa Technical
</button>
</section>
Class Selector –
CSS
Class-
Selector
Valu
.btn{ e
color: blue;
Propert font-weight: bold;
y
}
Declaratio
n
ID Selector – HTML /
CSS ID-Selector
<section>
<button id="btn">
Subscribe Thapa
Technical
</button>
</section>
ID Selector –
CSS
ID-
Selector
Valu
#btn{ e
color: blue;
Propert font-weight: bold;
y
}
Pseudo- Class –
CSS
Pseudo-
class
Valu
a:hover{ e
color: blue;
Propert font-weight: bold;
y
}
Declaratio
n
05
CSS
Comment
s
CSS
Comment
/* This is a comment
*/
0
COLOR 6
S
IN CSS
RGB – YELLOW
RGB = 255, 255,
CSS
0
RED – FF 00
00 255, 0,
0 HEX = #FF
FF 00
1
0
GREEN – 00 FF
0f
00
i
G REE
0, 255, 0
0
BLUE – 00 00 RE
3
FF D N
0, 0, 255
CYAN
Magenta
RGB = 0, 255,
RGB = 255, 0,
255 HEX = #FF
B LU 255
E HEX = #00 FF
00 FF
FF
😊
COLOR
S
(BONUS)
GRAPHIC DESGINER –
CSS
1 Hue: A puíe
coloí
color position
0f background- 0 background-
i image 5 size
03 background- 06 background-
repeat attachment
0
8
UNITS IN
CSS
Absolute Relative
Lengths Lengths
01 Pexels 04
(px ) em
0f Inches 0 Root em
i (in) 5 (rem)
03 Points 0 Percentag e
6 (%)
(pt)
0
FONTS IN 8
CSS
FONT PROPERTIES -
CSS
01 Font 04 Font
Family S tyle
0f Font 0 Font
i S ize 5 V ariant
03 Font
Weig ht
0
TEXTS IN 9
CSS
TEXT PROPERTIES -
CSS
01 Text 04 Text
Alignment Spacing
0f Text 0 Text
i Decoration 5 Shadow
03 Text
Transform
TEXT SHADOW –
CSS Blur-
radius
O ffset-
Y
BORDER
PADDING
RIG H
HT
HEIG
LEF
CONTENT
T T
T
WIDTH
BOTTO
M
1
0
BORDER IN
CSS
Border –
CSS Border-
Color
Border-
Style
BORDER
PADDING
RIG H
HT
HEIG
LEF
CONTENT
T T
T
WIDTH
BOTTO
M
14
CSS
Gradient
s
Gradient –
CSS
Color-
Property stop2
Color-stop1
Gradient with Direction –
CSS
Propert
y
background-image: linear-gradient
Directio
(to right, n
red, yellow);
Color-
stops
Gradient with Angles –
CSS
Property
background-image: linear-gradient
Angl
(90deg, e
red, yellow);
Color-stops
Radial Gradient –
CSS
Color-
Property stop2
Color-stop1
Gradient with Shape –
CSS
Property
background-image: linear-gradient
Shap
(circle, e
red, yellow);
Color-stops
1
5
BOX
IN
SHADOWCSS
BOX SHADOW –
CSS
Density/
Off set-
Spread
Y
Off set-
X Blur-
radius
1
7
FILTERS IN
CSS
FILTERS -
CSS
01 0f opacit
i y()
g ra yscale()
0 blur 0 contras
3 () 4 t()
05 06
brightness() invert()
1
8
LISTS IN
CSS
LIST PROPERTIES -
CSS
01 List-style- 03 List-style-
type position
0f List-style- 0 List-style-
i image property
4
1
9
ANCHOR IN
CSS
ANCHOR STATES -
CSS
0 Link 0f Visited
1 (`a:link`) i (`a:visited`)
(`a :a ctive`)
fi
0
COMBINATOR
S
IN CSS
COMBINATORS -
CSS
Descendant
0 0f Child Selector
Selector
1 i (>)
(Space)
Adjacent General Sibling
0 S ibling 0 Selector
3 Selector (+) 4 (~)
0 Universal
5 Selector (*)
fi
1
DISPLAY IN
CSS
DISPLAYS -
CSS
0 Block-Level 0f Inline
1 Elements i Elements
0 Inline-Block
3 Elements
fif
i
POSITION
S
IN CSS
POSITIONS -
CSS
0 Relati 0f Absolu
1 ve i te
03 04
S ta tic Fixed
0 S tic
5 ky
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
}
Child
Div
Parent
Div
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
By Default: Top: 0,
left: 0
Top:0,
íight:0
.child {
position: absolute;
left: 50%
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 50%
top:50%
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 0;
bottom:0;
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
right: 0;
bottom:0;
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
top: 0;
left:0;
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
bottom:0, bottom:0,
left:0 íight:0
🔥
Z-INDEX IN
CSS
fi
5
OVERFLO
W
IN CSS
OVERFLOW -
CSS
Overflow:
0 03 Overflow:
Visible
1 (Default) Scroll
0f Overflow: 0 Overflow:
i Hidden Auto
4
fi
6
PSEUDO
ELEMENTS
IN CSS
Pseudo Elements -
CSS
0 ::befo 0f ::aft
1 re i er
03 ::first-letter 04 ::first-line
0 ::selecti 0 ::placehol
5 on 6 der
fi
7
PSEUDO
CLASS
IN CSS
Pseudo Class -
CSS
0 :hov 0f :first-
1 er i child
03 :last- 04 :nth-
child child(n)
0 :first-of- 0 :last-of-
5 type 6 type
fi
8
COLUMN
LAYOUT
IN CSS
COLUMN LAYOUT -
CSS
0 Column- 0f Column-
1 count i g ap
03 Column- 04 Column-
rule fill
fi
8
FLEXBOX
IN CSS
FLEXBOX -
CONTAINER
.flex-container {
display: flex;
}
FLEXBOX –
ROW
.flex-container {
display: flex;
flex-direction:
row;
}
MAIN-AXIS
CROSS-AXIS
FLEXBOX -
COLUMN
.flex-container {
display: flex;
flex-direction:
row;
flex-direction:
Column;
}
MAIN-AXIS
CROSS-AXIS
FLEXBOX -
CONTAINER
.flex-container {
display: flex;
flex-direction: Column;
flex-direction: row;
justify-content:start
CROSS- }
AXIS
MAIN-AXIS
FLEXBOX -
CSS
.flex-container {
display: flex;
flex-direction:
row;
justify-
content:center
}
MAIN-AXIS
CROSS-AXIS
FLEXBOX -
CSS
.flex-container {
display: flex;
flex-direction: row;
justify-content:flex-end
}
FLEXBOX -
CSS
.flex-container {
display: flex;
flex-direction:
row;
justify-
content:space-
between
}
FLEXBOX -
CSS
.flex-container {
display: flex;
flex-direction:
row;
justify-
content:start;
}
FLEXBOX -
CSS .flex-container {
display: flex;
flex-direction: row;
justify-content:start;
align-items: start;
}
FLEXBOX -
CSS .flex-container {
display: flex;
flex-direction: row;
justify-content:start;
align-items: center;
}
FLEXBOX -
COLUMN .flex-container {
display: flex;
flex-direction: row;
justify-content:start;
align-items:end
}
FLEXBOX -
COLUMN .flex-container {
display: flex;
flex-direction: row;
justify-content:center
align-items:end;
}
FLEXBOX -
COLUMN .flex-container {
display: flex;
flex-direction: row;
justify-content:center
align-items:center
}
FLEXBOX -
COLUMN .flex-container {
display: flex;
flex-direction: row;
justify-content:center
align-items:center
}
🚀
GRID IN
CSS
fi
9
TRANSITIONS
IN CSS
TRANSITIONS -
CSS
01 transition- 03 transition-timing-
property function
0f transition- 0 transition-
i duration delay
4
3
0
TRANSFOR
M
IN CSS
TRANSFORM -
CSS
0 transform: 0f transform:
1 translate() i scale()
03 transform: 04 transform:
rotate() skew()
3
1
ANIMATIO
N
IN CSS
ANIMATION -
CSS
0 animation- 0f animation-
1 name i duration
03 animation-timing- 04 animation-
function delay
0 animation-iteration- 0 animation-
5 count 6 direction
3f
i
CSS
VARIABLES
IN
CSS
3
3
SPECIFICIT
Y
IN CSS
SELCTORS IN
CSS
Element /
0 * (universal 0f
pseudo-
1 selector) i element
03 Cla ss or pseudo- 04
cla ss id
0 Inline 0 !
5 style 6 importa
nt
The Level of SPECIFICITY -
CSS
0.0.0.0.0 * (Universal
Selector)
0.0.1.0.0 Id
0.1.0.0.0
Inlin
e
!
importa
nt
1.0.0.0.0
For each important keyword ex h1 {color: red!
important}
add 1-0-0-0-0 to the weight value.
3
4
NEW CSS
FEATURES
New Features -
CSS
Media query
0 :is, :has, :not, : 0f
range syntax
1 where i
03 Container 04 Accent-color
queries
0 Aspect 0 Scroll
5 ratio 6 snap
New Features -
CSS
Individual
0 0 C SS
Transform
7 8 Nesting
Properties
C SS Logical
09 Gap Property for 1 Properties
Flexbox
0 (inline and block)
1 C SS Writing 1 :focus-
1 Mode fi visible
3
5
BONU
S
IN CSS
BONUS -
CSS
0 FLOA 0f C SS CLIP
1 TS i PATH
03 C SS AOS 04 C S S SHAPE
PLUGIN DIVIDER
HOW TO
CENTER A DIV
INSIDE
IN DIV
CSS
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
}
Child
Div
Parent
Div
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
By Default: Top: 0,
left: 0
Top:0,
íight:0
.child {
position: absolute;
left: 50%
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 50%
top:50%
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 50%;
top:50%;
transform:translate
(-50%)
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 50%;
top:50%;
transform:translate
(-50%,-50%)
}
bottom:0, bottom:0,
left:0 íight:0
POSITIONS –
Absolute
Top:0,
left:0
Top:0,
íight:0
.child {
position: absolute;
left: 50%;
bottom:50%;
transform:translate
(-50%,-50%)
}
bottom:0, bottom:0,
left:0 íight:0
FLEXBOX -
CSS .flex-container {
display: flex;
flex-direction: row;
justify-content:start;
align-items: center;
}
FLEXBOX -
COLUMN .flex-container {
display: flex;
flex-direction: row;
justify-content:start;
align-items:end
}
Opera
Browser Compatibility in
CSS
https://www.w3.org/community/webed/wiki/
Optimizing_content_for_different_browsers:_the_RIGHT_way
BE
M
BEM (Block,
Element,
Modifier)
Methodology
https://getbem.com/
https://css-tricks.com/bem-101/
SMACS
S
SMACSS
(Scalable and
Modular
Architecture for
Home - Scalable and Modular Architecture for C S S
(smacss.com)
CSS)
4
0
FINAL
PROJECTS
IN CSS
4
SE 1
O
IN
SEO -
CSSInclude a descriptive and keyword-rich <title>
0
tag within
<head> the of your HTML
section
1
document.
0f Meta Description
i Tag
0 Proper Heading
3 Tags
04 Imag e
O ptimiza tion
4
1
TESTING
IN CSS
CSS Performance and
Optimization
0 Minification and
1 Compression
03 Reducing Render
Blocking
Website Testing -
CSS
0 Lighthouse
1 testing
0fi https://
pagespeed.web.dev/
03 https://gtmetrix.com/
4
1
HOSTING
WEBSITE
LIVE
HOSTING WEBSITE
LIVE NETLI HOSTING
FY ER
https://www.netlify.com/ http://www.hostinger.com
/
Thank
s!
Subscribe Shieldx Academy if you like
d
the presentation.