SlideShare a Scribd company logo
1 of 34
Oriented by: Doeun KOCH
Tell:
081399216/092228454
doeunkoch@gmail.com
Import style sheet
• In style sheet, we can import other style sheet
by use
• @import “style.css”;
CSS Selectors
Tag, Class, ID, Compound
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.
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
body {margin: 10px 0;}
Selector Property Value
Declaration
CSS Selectors
body {margin: 10px 0;}
Tag*: properties defined for an HTML tag.
(*Also referred to as Type, Element)
CSS Selectors
body {margin: 10px 0;}
<body>
Everything within the body will start out
with this property.
</body>
Tag
CSS Selectors
.red {margin: 15px; color: red;}
Class: properties defined for an HTML tag
using a class or a <span> tag.
CSS Selectors
.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>
Class
CSS Selectors
#wrapper {margin :0 auto;}
ID: properties defined for an element or div using
an id.
CSS Selectors
#wrapper {margin :0 auto;}
<div id=”wrapper”></div>
ID
CSS Selectors
#content p {margin :0;}
Compound: properties defined using multiple
selector types.
CSS Selectors
#content p {margin :0;}
<div id=”content”>
<p>This is a paragraph of text in the
content div.</p>
</div>
Compound
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
40 px
10 px
100 px
450 px
content
CSS Box Model
10 px
1 px
50 px
??? px
500 px
content
CSS Box Model
total box width =
content area width +
left padding + right padding +
left border + right border +
left margin + right margin
CSS Box Model
#content {width:
200px;border: 1px solid
#900;padding: 10px;margin:
0;background: #fee;}
What is the total box width?
CSS Box Model
#content {width: ???
px;border: 1px solid
#000;padding: 20px;margin:
10;}
If the total box width is 400px, what is the width
of the content area?
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

What's hot (19)

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Jquery
JqueryJquery
Jquery
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
 
jQuery
jQueryjQuery
jQuery
 
Jquery introduction
Jquery introductionJquery introduction
Jquery introduction
 
Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4Web Application Development using PHP Chapter 4
Web Application Development using PHP Chapter 4
 
DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Hardcore CSS
Hardcore CSSHardcore CSS
Hardcore CSS
 
Css selector - BNT 11
Css selector - BNT 11 Css selector - BNT 11
Css selector - BNT 11
 
Css3
Css3Css3
Css3
 
Introduction 2 css
Introduction 2 cssIntroduction 2 css
Introduction 2 css
 
From Shabby to Chic
From Shabby to ChicFrom Shabby to Chic
From Shabby to Chic
 
Cssxcountry slides
Cssxcountry slidesCssxcountry slides
Cssxcountry slides
 
2 introduction css
2 introduction css2 introduction css
2 introduction css
 
RenoirSt - A DSL enabling programmatic cascading style sheet generation
RenoirSt - A DSL enabling programmatic cascading style sheet generationRenoirSt - A DSL enabling programmatic cascading style sheet generation
RenoirSt - A DSL enabling programmatic cascading style sheet generation
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 

Viewers also liked

Viewers also liked (15)

Feedback
FeedbackFeedback
Feedback
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
Diapositivas Tic's
Diapositivas Tic'sDiapositivas Tic's
Diapositivas Tic's
 
Cch education deck
Cch education deckCch education deck
Cch education deck
 
за социальное партнерство 09
за социальное партнерство 09за социальное партнерство 09
за социальное партнерство 09
 
Additional HTML
Additional HTML Additional HTML
Additional HTML
 
Challenges vs opportunities
Challenges vs opportunitiesChallenges vs opportunities
Challenges vs opportunities
 
Collector networks, expert directories, and #altmetrics: Museum data potenti...
Collector networks, expert directories, and #altmetrics: Museum data potenti...Collector networks, expert directories, and #altmetrics: Museum data potenti...
Collector networks, expert directories, and #altmetrics: Museum data potenti...
 
CCH Education Deck
CCH Education Deck CCH Education Deck
CCH Education Deck
 
HTML
HTMLHTML
HTML
 
Seminar Sandefjord 2013
Seminar Sandefjord 2013Seminar Sandefjord 2013
Seminar Sandefjord 2013
 
Question 3:
Question 3: Question 3:
Question 3:
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 

Similar to Css

Similar to Css (20)

Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Basic css
Basic cssBasic css
Basic css
 
Lecture2
Lecture2Lecture2
Lecture2
 
WT CSS
WT  CSSWT  CSS
WT CSS
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
CSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box ModelCSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box Model
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
 
CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)
 
Css
CssCss
Css
 
html-css
html-csshtml-css
html-css
 
Howcssworks 100207024009-phpapp01
Howcssworks 100207024009-phpapp01Howcssworks 100207024009-phpapp01
Howcssworks 100207024009-phpapp01
 
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
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
 
5. Web Technology CSS Advanced
5. Web Technology CSS Advanced 5. Web Technology CSS Advanced
5. Web Technology CSS Advanced
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
Css basics
Css basicsCss basics
Css basics
 
Css introduction
Css  introductionCss  introduction
Css introduction
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

Css

  • 1. Oriented by: Doeun KOCH Tell: 081399216/092228454 doeunkoch@gmail.com
  • 2. Import style sheet • In style sheet, we can import other style sheet by use • @import “style.css”;
  • 3. CSS Selectors Tag, Class, ID, Compound 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.
  • 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 body {margin: 10px 0;} Selector Property Value Declaration
  • 6. CSS Selectors body {margin: 10px 0;} Tag*: properties defined for an HTML tag. (*Also referred to as Type, Element)
  • 7. CSS Selectors body {margin: 10px 0;} <body> Everything within the body will start out with this property. </body> Tag
  • 8. CSS Selectors .red {margin: 15px; color: red;} Class: properties defined for an HTML tag using a class or a <span> tag.
  • 9. CSS Selectors .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> Class
  • 10. CSS Selectors #wrapper {margin :0 auto;} ID: properties defined for an element or div using an id.
  • 11. CSS Selectors #wrapper {margin :0 auto;} <div id=”wrapper”></div> ID
  • 12. CSS Selectors #content p {margin :0;} Compound: properties defined using multiple selector types.
  • 13. CSS Selectors #content p {margin :0;} <div id=”content”> <p>This is a paragraph of text in the content div.</p> </div> Compound
  • 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.
  • 16. CSS Box Model 40 px 10 px 100 px 450 px content
  • 17. CSS Box Model 10 px 1 px 50 px ??? px 500 px content
  • 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 #content {width: 200px;border: 1px solid #900;padding: 10px;margin: 0;background: #fee;} What is the total box width?
  • 20. CSS Box Model #content {width: ??? px;border: 1px solid #000;padding: 20px;margin: 10;} If the total box width is 400px, what is the width of the content area?
  • 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; }