SlideShare a Scribd company logo
Oriented by: Vibol YOEUNG 
Tell: 077 377 067 
Yoeung.vibol@gmail.com
Import style sheet 
• In style sheet, we can import other style 
sheet by use 
• @import “style.css”;
CSS Selectors 
Use CSS Selectors to define properties for the 
structure and presentation of your site. 
This is the key to defining specific properties for 
specific parts of your design. 
Tag, Class, ID, Compound
CSS Selectors 
Tag: properties defined for an HTML tag. 
Class: properties defined for an HTML tag 
using a class or a <span> tag. 
ID: properties defined for an element or div 
using an id. 
Compound: properties defined using multiple 
selector types.
CSS Selectors 
Declaration 
body {margin: 10px 0;} 
Selector Property Value
CSS Selectors 
Tag*: properties defined for an HTML tag. 
(*Also referred to as Type, Element) 
body {margin: 10px 0;}
CSS Selectors 
Tag 
body {margin: 10px 0;} 
<body> 
Everything within the body will start out 
with this property. 
</body>
CSS Selectors 
Class: properties defined for an HTML tag 
using a class or a <span> tag. 
.red {margin: 15px; color: red;}
CSS Selectors 
Class 
.red {margin: 15px; color: red;} 
<p class=”red”>This is a paragraph of text 
in red.</p> 
These are <span class=”red”>words in 
red.</span>
CSS Selectors 
ID: properties defined for an element or div 
using an id. 
#wrapper {margin :0 auto;}
CSS Selectors 
ID 
#wrapper {margin :0 auto;} 
<div id=”wrapper”></div>
CSS Selectors 
Compound: properties defined using multiple 
selector types. 
#content p {margin :0;}
CSS Selectors 
Compound 
#content p {margin :0;} 
<div id=”content”> 
<p>This is a paragraph of text in the 
content div.</p> 
</div>
CSS Box Model 
How do you position content? 
You position content in your page by 
using a combination of margins, padding 
and floats. 
But, in order to get your positioning and 
layout correct, you must know how the 
CSS Box Model works.
CSS Box Model 
content
CSS Box Model 
10 px 
40 px 
100 px 
content 
450 px
CSS Box Model 
1 px 
10 px 
50 px 
content 
??? px 
500 px
CSS Box Model 
total box width = 
content area width + 
left padding + right padding + 
left border + right border + 
left margin + right margin
CSS Box Model 
What is the total box width? 
#content {width: 
200px;border: 1px solid 
#900;padding: 10px;margin: 
0;background: #fee;}
CSS Box Model 
If the total box width is 400px, what is the width 
of the content area? 
#content {width: 
???px;border: 1px solid 
#000;padding: 20px;margin: 
10;}
Pseudo-Selectors 
• •General Purpose Pseudo-Selector: 
• –:hover Element with mouse over 
• Specific to hyperlinks (and/or buttons) 
• –a:active A link or button that is currently 
being clicked on. 
• –a:link A link that has NOT been visited yet. 
• –a:visited A link that HAS been visited.
Background Image Properties 
• background-image: 
url(../location/of/image.jpg) 
• •background-repeat:tile image in 
background 
• •background-position:vertical(top, center, 
bottom, or size) horizontal(left, center, right, 
or size) 
• •background-attachment: (scrollor fixed)
Text Properties 
• text-indent:indents first line of a paragraph 
according to size 
• text-align:right;or left;or center;or justify; 
• text-decoration: none; orunderline; 
• text-transform:Capitalize; 
• Line-height:added vertical space to each 
line of text according to size
Text shadows 
• h3 {text-shadow: 1px 1px 2px #00} 
• x (horizontal) offset casts shadow to the right 
of the text. Negative cast to the left. 
• y (vertical) offset casts shadow below the 
text. Negative value casts above 
• Blue radius: blurs the shadow, with higher 
values making the shadow wider or lighter. 
• Color: make color for shadow text
Attribute selector 
- CSS [attribute]: use to select element with specified 
attribute 
Ex. a[target] {color: red} 
- CSS [attribute=value]: use to select element with 
specified attribute and value 
Ex. Input[type=“submit”] {color: #fff}
Attribute selector(con) 
- CSS [attribute~=value]: use to select element with 
an attribute with containing a specified word 
- Ex. [title~=“shop”] {color: #000} 
- CSS [attribute|=value]: select elements with the 
specified attribute starting with the specified value. 
- Ex. [class|=“top”] {background: blue}
Attribute selector(con) 
- CSS [attribute^=value]: used to select elements 
whose attribute value begins with a specified 
value 
Ex. [class^=“top”] {background: blue} 
- CSS [attribute$=value]: used to select elements 
whose attribute value ends with a specified value. 
Ex. [class$=“top”] {background: blue}
List Properties <ul> 
• list-style-type:none, disc, circle, 
square,(other types available) 
• list-style-position: inside oroutside 
• list-style-image:url(../path/to/image.jpg) 
• …or shorthand 
• list-style:type position image
Position 
• Static position: is a default position and 
element is always positioned according to 
the normal flow of the page.
Position fixed 
• An element with fixed position is positioned 
relative the browser window. It will not move 
even if window is scrolled:
Position fixed(con) 
• Ex. 
• .box { 
position: fixed; 
width: 400px; 
height: 400px; 
}
Position relative 
• element is positioned relative to its normal 
position. 
• Ex. Box2 { 
position: relative; 
left: -10px; 
}
Position absolute 
• An absolute position element is positioned 
relative to the first parent element that has a 
position other than static. 
• Ex. Box2 { 
position: absolute; 
left: 10px; 
top: 20px; 
}
Z-index 
• property specifies the stack order of an 
element (which element should be placed in 
front of, or behind, the others). 
• Ex. .box2 { 
z-index: 1; 
Position: absolute; 
}

More Related Content

What's hot

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Css3
Css3Css3
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
Russ Weakley
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2
Himanshu Pathak
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
Toni Kolev
 
2 introduction css
2 introduction css2 introduction css
2 introduction css
Jalpesh Vasa
 
Style With Kyle - Kyle Smith
Style With Kyle - Kyle SmithStyle With Kyle - Kyle Smith
Style With Kyle - Kyle Smith
wcfay
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
Nicole Glasgow
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3Jamshid Hashimi
 
Sass
SassSass
CSS
CSSCSS
Css3
Css3Css3
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
Christopher Schmitt
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
Toni Kolev
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
AakankshaR
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 

What's hot (20)

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
CSS and Layout
CSS and LayoutCSS and Layout
CSS and Layout
 
Css3
Css3Css3
Css3
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
2 introduction css
2 introduction css2 introduction css
2 introduction css
 
Style With Kyle - Kyle Smith
Style With Kyle - Kyle SmithStyle With Kyle - Kyle Smith
Style With Kyle - Kyle Smith
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Sass
SassSass
Sass
 
CSS
CSSCSS
CSS
 
Css3
Css3Css3
Css3
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 

Viewers also liked

HTML basic
HTML basicHTML basic
HTML basic
Yoeung Vibol
 
Javascript DOM
Javascript DOMJavascript DOM
Javascript DOM
Yoeung Vibol
 
Laporan KKA Mahasiswa UMK
Laporan KKA Mahasiswa UMKLaporan KKA Mahasiswa UMK
Laporan KKA Mahasiswa UMK
La hamu
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
Yoeung Vibol
 
PHP Basic
PHP BasicPHP Basic
PHP Basic
Yoeung Vibol
 
Domino & REST
Domino & RESTDomino & REST
Domino & REST
賢次 海老原
 
Vip o santo
Vip o santoVip o santo
Penggunaan Kalkulator Saintifik -Taburan normal
Penggunaan Kalkulator Saintifik -Taburan normalPenggunaan Kalkulator Saintifik -Taburan normal
Penggunaan Kalkulator Saintifik -Taburan normal
amimuin
 
Penggunaan Kalkulator Saintifik - Taburan normal
Penggunaan Kalkulator Saintifik - Taburan normalPenggunaan Kalkulator Saintifik - Taburan normal
Penggunaan Kalkulator Saintifik - Taburan normal
amimuin
 
Penggunaan Kalkulator - Persamaan kuadratik
Penggunaan Kalkulator - Persamaan kuadratikPenggunaan Kalkulator - Persamaan kuadratik
Penggunaan Kalkulator - Persamaan kuadratik
amimuin
 
Penggunaan Kalkulator Saintifik - Persamaan serentak
Penggunaan Kalkulator Saintifik - Persamaan serentakPenggunaan Kalkulator Saintifik - Persamaan serentak
Penggunaan Kalkulator Saintifik - Persamaan serentak
amimuin
 

Viewers also liked (14)

HTML basic
HTML basicHTML basic
HTML basic
 
Shapes
ShapesShapes
Shapes
 
Javascript DOM
Javascript DOMJavascript DOM
Javascript DOM
 
Laporan KKA Mahasiswa UMK
Laporan KKA Mahasiswa UMKLaporan KKA Mahasiswa UMK
Laporan KKA Mahasiswa UMK
 
Dhanashri Deshmukh Resume
Dhanashri Deshmukh ResumeDhanashri Deshmukh Resume
Dhanashri Deshmukh Resume
 
shapes
shapesshapes
shapes
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
PHP Basic
PHP BasicPHP Basic
PHP Basic
 
Domino & REST
Domino & RESTDomino & REST
Domino & REST
 
Vip o santo
Vip o santoVip o santo
Vip o santo
 
Penggunaan Kalkulator Saintifik -Taburan normal
Penggunaan Kalkulator Saintifik -Taburan normalPenggunaan Kalkulator Saintifik -Taburan normal
Penggunaan Kalkulator Saintifik -Taburan normal
 
Penggunaan Kalkulator Saintifik - Taburan normal
Penggunaan Kalkulator Saintifik - Taburan normalPenggunaan Kalkulator Saintifik - Taburan normal
Penggunaan Kalkulator Saintifik - Taburan normal
 
Penggunaan Kalkulator - Persamaan kuadratik
Penggunaan Kalkulator - Persamaan kuadratikPenggunaan Kalkulator - Persamaan kuadratik
Penggunaan Kalkulator - Persamaan kuadratik
 
Penggunaan Kalkulator Saintifik - Persamaan serentak
Penggunaan Kalkulator Saintifik - Persamaan serentakPenggunaan Kalkulator Saintifik - Persamaan serentak
Penggunaan Kalkulator Saintifik - Persamaan serentak
 

Similar to CSS for basic learner

Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
Hawkman Academy
 
Css
CssCss
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
Swapnali Pawar
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
jeweltutin
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
M Ashraful Islam Jewel
 
html-css
html-csshtml-css
WT CSS
WT  CSSWT  CSS
WT CSS
Mohan186867
 
Unit - 3 CSS(Cascading Style Sheet).pptx
Unit - 3 CSS(Cascading Style Sheet).pptxUnit - 3 CSS(Cascading Style Sheet).pptx
Unit - 3 CSS(Cascading Style Sheet).pptx
kushwahanitesh592
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Css3
Css3Css3
CSS Topic wise Short notes ppt by Navya.E
CSS Topic wise Short notes ppt by Navya.ECSS Topic wise Short notes ppt by Navya.E
CSS Topic wise Short notes ppt by Navya.E
NavyaEnugala
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2Shawn Calvert
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layoutCK Yang
 
CSS
CSSCSS
Web technology
Web technologyWeb technology
Web technology
syeda zainab
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
haroon451422
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsSenthil Kumar
 

Similar to CSS for basic learner (20)

Basic css
Basic cssBasic css
Basic css
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Css
CssCss
Css
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
html-css
html-csshtml-css
html-css
 
WT CSS
WT  CSSWT  CSS
WT CSS
 
Unit - 3 CSS(Cascading Style Sheet).pptx
Unit - 3 CSS(Cascading Style Sheet).pptxUnit - 3 CSS(Cascading Style Sheet).pptx
Unit - 3 CSS(Cascading Style Sheet).pptx
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css3
Css3Css3
Css3
 
CSS Topic wise Short notes ppt by Navya.E
CSS Topic wise Short notes ppt by Navya.ECSS Topic wise Short notes ppt by Navya.E
CSS Topic wise Short notes ppt by Navya.E
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
Web technology
Web technologyWeb technology
Web technology
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 

Recently uploaded

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 

Recently uploaded (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

CSS for basic learner

  • 1. Oriented by: Vibol YOEUNG Tell: 077 377 067 Yoeung.vibol@gmail.com
  • 2. Import style sheet • In style sheet, we can import other style sheet by use • @import “style.css”;
  • 3. CSS Selectors Use CSS Selectors to define properties for the structure and presentation of your site. This is the key to defining specific properties for specific parts of your design. Tag, Class, ID, Compound
  • 4. CSS Selectors Tag: properties defined for an HTML tag. Class: properties defined for an HTML tag using a class or a <span> tag. ID: properties defined for an element or div using an id. Compound: properties defined using multiple selector types.
  • 5. CSS Selectors Declaration body {margin: 10px 0;} Selector Property Value
  • 6. CSS Selectors Tag*: properties defined for an HTML tag. (*Also referred to as Type, Element) body {margin: 10px 0;}
  • 7. CSS Selectors Tag body {margin: 10px 0;} <body> Everything within the body will start out with this property. </body>
  • 8. CSS Selectors Class: properties defined for an HTML tag using a class or a <span> tag. .red {margin: 15px; color: red;}
  • 9. CSS Selectors Class .red {margin: 15px; color: red;} <p class=”red”>This is a paragraph of text in red.</p> These are <span class=”red”>words in red.</span>
  • 10. CSS Selectors ID: properties defined for an element or div using an id. #wrapper {margin :0 auto;}
  • 11. CSS Selectors ID #wrapper {margin :0 auto;} <div id=”wrapper”></div>
  • 12. CSS Selectors Compound: properties defined using multiple selector types. #content p {margin :0;}
  • 13. CSS Selectors Compound #content p {margin :0;} <div id=”content”> <p>This is a paragraph of text in the content div.</p> </div>
  • 14. CSS Box Model How do you position content? You position content in your page by using a combination of margins, padding and floats. But, in order to get your positioning and layout correct, you must know how the CSS Box Model works.
  • 15. CSS Box Model content
  • 16. CSS Box Model 10 px 40 px 100 px content 450 px
  • 17. CSS Box Model 1 px 10 px 50 px content ??? px 500 px
  • 18. CSS Box Model total box width = content area width + left padding + right padding + left border + right border + left margin + right margin
  • 19. CSS Box Model What is the total box width? #content {width: 200px;border: 1px solid #900;padding: 10px;margin: 0;background: #fee;}
  • 20. CSS Box Model If the total box width is 400px, what is the width of the content area? #content {width: ???px;border: 1px solid #000;padding: 20px;margin: 10;}
  • 21. Pseudo-Selectors • •General Purpose Pseudo-Selector: • –:hover Element with mouse over • Specific to hyperlinks (and/or buttons) • –a:active A link or button that is currently being clicked on. • –a:link A link that has NOT been visited yet. • –a:visited A link that HAS been visited.
  • 22. Background Image Properties • background-image: url(../location/of/image.jpg) • •background-repeat:tile image in background • •background-position:vertical(top, center, bottom, or size) horizontal(left, center, right, or size) • •background-attachment: (scrollor fixed)
  • 23. Text Properties • text-indent:indents first line of a paragraph according to size • text-align:right;or left;or center;or justify; • text-decoration: none; orunderline; • text-transform:Capitalize; • Line-height:added vertical space to each line of text according to size
  • 24. Text shadows • h3 {text-shadow: 1px 1px 2px #00} • x (horizontal) offset casts shadow to the right of the text. Negative cast to the left. • y (vertical) offset casts shadow below the text. Negative value casts above • Blue radius: blurs the shadow, with higher values making the shadow wider or lighter. • Color: make color for shadow text
  • 25. Attribute selector - CSS [attribute]: use to select element with specified attribute Ex. a[target] {color: red} - CSS [attribute=value]: use to select element with specified attribute and value Ex. Input[type=“submit”] {color: #fff}
  • 26. Attribute selector(con) - CSS [attribute~=value]: use to select element with an attribute with containing a specified word - Ex. [title~=“shop”] {color: #000} - CSS [attribute|=value]: select elements with the specified attribute starting with the specified value. - Ex. [class|=“top”] {background: blue}
  • 27. Attribute selector(con) - CSS [attribute^=value]: used to select elements whose attribute value begins with a specified value Ex. [class^=“top”] {background: blue} - CSS [attribute$=value]: used to select elements whose attribute value ends with a specified value. Ex. [class$=“top”] {background: blue}
  • 28. List Properties <ul> • list-style-type:none, disc, circle, square,(other types available) • list-style-position: inside oroutside • list-style-image:url(../path/to/image.jpg) • …or shorthand • list-style:type position image
  • 29. Position • Static position: is a default position and element is always positioned according to the normal flow of the page.
  • 30. Position fixed • An element with fixed position is positioned relative the browser window. It will not move even if window is scrolled:
  • 31. Position fixed(con) • Ex. • .box { position: fixed; width: 400px; height: 400px; }
  • 32. Position relative • element is positioned relative to its normal position. • Ex. Box2 { position: relative; left: -10px; }
  • 33. Position absolute • An absolute position element is positioned relative to the first parent element that has a position other than static. • Ex. Box2 { position: absolute; left: 10px; top: 20px; }
  • 34. Z-index • property specifies the stack order of an element (which element should be placed in front of, or behind, the others). • Ex. .box2 { z-index: 1; Position: absolute; }

Editor's Notes

  1. | Note: The value has to be a whole word, either alone, like class="top", or followed by a hyphen( - ), like class="top-text"! <h1 class="top-header">Welcome</h1> <p class="top-text">Hello world!</p> <p class="topcontent">Are you learning CSS?</p>