SlideShare a Scribd company logo
1 of 30
CSS
Box Sizing
◦ The CSS box-sizing property allows us to include the padding and border in an element's total
width and height.
◦ Without the CSS box-sizing Property
◦ By default, the width and height of an element is calculated like this:
◦ width + padding + border = actual width of an element
height + padding + border = actual height of an element
◦ This means: When you set the width/height of an element, the element often appears bigger than
you have set (because the element's border and padding are added to the element's specified
width/height).
◦ With the CSS box-sizing Property
◦ The box-sizing property allows us to include the padding and border in an element's total width and
height.
◦ If you set box-sizing: border-box; on an element, padding and border are included in the width and
height
CSS Layout - float and clear
◦ The CSS float property specifies how an element should float.
◦ The CSS clear property specifies what elements can float beside the cleared element and on
which side.
float Property
◦ The float property is used for positioning and formatting content e.g. let an image float left to the
text in a container.
◦ The float property can have one of the following values:
◦ left - The element floats to the left of its container
◦ right - The element floats to the right of its container
◦ none - The element does not float (will be displayed just where it occurs in the text). This is default
◦ inherit - The element inherits the float value of its parent
◦ In its simplest use, the float property can be used to wrap text around images.
clear Property
◦ When we use the float property, and we want the next element below (not on right or left), we will
have to use the clear property.
◦ The clear property specifies what should happen with the element that is next to a floating element.
◦ The clear property can have one of the following values:
◦ none - The element is not pushed below left or right floated elements. This is default
◦ left - The element is pushed below left floated elements
◦ right - The element is pushed below right floated elements
◦ both - The element is pushed below both left and right floated elements
◦ inherit - The element inherits the clear value from its parent
CSS Units
◦ CSS Units
◦ CSS has several different units for expressing a length.
◦ Many CSS properties take "length" values, such as width, margin, padding, font-size, etc.
◦ Length is a number followed by a length unit, such as 10px, 2em, etc.
◦ Absolute
◦ Relative
Absolute Lengths
◦ The absolute length units are fixed and a length expressed in any of
these will appear as exactly that size.
◦ Absolute length units are not recommended for use on screen, because
screen sizes vary so much. However, they can be used if the output
medium is known, such as for print layout.
cm centimeters
mm millimeters
in inches (1in = 96px = 2.54cm)
px * pixels (1px = 1/96th of 1in)
pt points (1pt = 1/72 of 1in)
pc picas (1pc = 12 pt)
Relative Lengths
Relative length units specify a length relative to another length property. Relative length
units scale better between different rendering medium.
Unit Description
em Relative to the font-size of the element (2em means 2
times the size of the current font)
rem Relative to font-size of the root element
vw Relative to 1% of the width of the viewport*
vh Relative to 1% of the height of the viewport*
% Relative to the parent element
CSS box-shadow Property
◦ The box-shadow property attaches one or more shadows to an element.
◦ Syntax: box-shadow: 10px 10px grey;
CSS text-shadow Property
◦ The text-shadow property adds shadow to text.
◦ This property accepts a comma-separated list of shadows to be applied to the text.
◦ Syntax: text-shadow: 2px 2px #ff0000;
CSS Selectors
◦ CSS element Selector
◦ CSS id Selector
◦ CSS class Selector
◦ CSS Universal Selector
◦ CSS Grouping Selector
CSS clip Property
◦ The clip property lets you specify a rectangle to clip an absolutely positioned element. The
rectangle is specified as four coordinates, all from the top-left corner of the element to be
clipped.
◦ The clip property does not work if "overflow:visible".
◦ Syntax: clip: rect(0px,60px,200px,0px);
CSS clip-path Property
◦ The clip-path property lets you clip an element to a basic shape or to an SVG source.
CSS Grid Layout Module
The CSS Grid Layout Module offers a grid-based layout system, with rows and columns,
making it easier to design web pages without having to use floats and positioning.
Grid-area property
Grid Elements
◦ A grid layout consists of a parent element, with one or more child elements
Display Property
◦ An HTML element becomes a grid container when its display property is set to grid or inline-
grid.
◦ grid-template-areas
◦ grid-template-columns Property
◦ grid-template-row Property
◦ justify-content
◦ align-content
Responsive Web Design
◦ Responsive web design makes your web page look good on all devices.
◦ Responsive web design uses only HTML and CSS.
◦ Responsive web design is not a program or a JavaScript
The Viewport
◦ The viewport is the user's visible area of a web page.
◦ The viewport varies with the device, and will be smaller on a mobile phone than on a computer
screen.
◦ Setting The Viewport
◦ <meta name="viewport" content="width=device-width, initial-scale=1.0">
◦ This gives the browser instructions on how to control the page's dimensions and scaling.
◦ The width=device-width part sets the width of the page to follow the screen-width of the device
(which will vary depending on the device).
◦ The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.
◦
Media Queries
◦ Media query is a CSS technique introduced in CSS3.
◦ It uses the @media rule to include a block of CSS properties only if a certain condition is true.
◦ If the browser window is 600px or smaller, the background color will be lightblue:
◦ @media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
◦ Always Design for Mobile First
◦ Mobile First means designing for mobile before designing for desktop or any other device (This
will make the page display faster on smaller devices).
Example
Break Points
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {...}
/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {...}
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {...}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {...}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {...}
Orientation: Portrait / Landscape
◦ Media queries can also be used to change layout of a page depending on the orientation of the
browser.
◦ @media only screen and (orientation: landscape) {
body {
background-color: lightblue;
}
}
Hide Elements With Media Queries
◦ Another common use of media queries, is to hide elements on different screen sizes:
◦ /* If the screen size is 600px wide or less, hide the element */
@media only screen and (max-width: 600px) {
div.example {
display: none;
}
}
Button Styling
◦ Basic Button Styling
◦ Button Colors
◦ Button Sizes
◦ Rounded Buttons
◦ Colored Button Borders
◦ Hoverable Buttons
◦ Shadow Buttons
◦ Disabled Buttons
◦ Animated Buttons
Styling Tables
◦ Table Borders
◦ Full-Width Table
◦ Collapse Table Borders
◦ Table Width and Height
◦ Table Alignment
◦ Table Padding
◦ Horizontal Dividers
◦ Hoverable Table
◦ Striped Tables
◦ Table Color
CSS transform Property
◦ Rotate
◦ Skew
◦ Scale
• translate()
• rotate()
• scaleX()
• scaleY()
• scale()
• skewX()
• skewY()
• skew()
CSS tranisition property
CSS transitions allows you to change property values
smoothly, over a given duration.
◦ transition
◦ transition-delay => Delay the Transition Effect
◦ transition-duration
◦ transition-property
◦ transition-timing-function => Specify the Speed Curve of the Transition

More Related Content

Similar to CSS.pptx

responsive web design 1_oct_2013
responsive web design  1_oct_2013 responsive web design  1_oct_2013
responsive web design 1_oct_2013 Suresh B
 
responsive web design
responsive web designresponsive web design
responsive web designSuresh B
 
Going Responsive with WordPress
Going Responsive with WordPressGoing Responsive with WordPress
Going Responsive with WordPressJames Cryer
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJustin Avery
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)Rajat Pratap Singh
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
The specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopThe specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopbetabeers
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...Patrick Lauke
 
Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Patrick Lauke
 

Similar to CSS.pptx (20)

responsive web design 1_oct_2013
responsive web design  1_oct_2013 responsive web design  1_oct_2013
responsive web design 1_oct_2013
 
Rwd ppt
Rwd pptRwd ppt
Rwd ppt
 
responsive web design
responsive web designresponsive web design
responsive web design
 
CSS
CSSCSS
CSS
 
Going Responsive with WordPress
Going Responsive with WordPressGoing Responsive with WordPress
Going Responsive with WordPress
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
CSS3 PPT.pptx
CSS3 PPT.pptxCSS3 PPT.pptx
CSS3 PPT.pptx
 
The specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktopThe specs behind the sex, mobile-friendly layout beyond the desktop
The specs behind the sex, mobile-friendly layout beyond the desktop
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Css 3 session1
Css 3 session1Css 3 session1
Css 3 session1
 
HTML and CSS part 3
HTML and CSS part 3HTML and CSS part 3
HTML and CSS part 3
 
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
Adapt and respond - mobile-friendly layouts beyond the desktop - standards>ne...
 
Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
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
 
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"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

CSS.pptx

  • 1. CSS
  • 2. Box Sizing ◦ The CSS box-sizing property allows us to include the padding and border in an element's total width and height.
  • 3. ◦ Without the CSS box-sizing Property ◦ By default, the width and height of an element is calculated like this: ◦ width + padding + border = actual width of an element height + padding + border = actual height of an element ◦ This means: When you set the width/height of an element, the element often appears bigger than you have set (because the element's border and padding are added to the element's specified width/height).
  • 4.
  • 5. ◦ With the CSS box-sizing Property ◦ The box-sizing property allows us to include the padding and border in an element's total width and height. ◦ If you set box-sizing: border-box; on an element, padding and border are included in the width and height
  • 6. CSS Layout - float and clear ◦ The CSS float property specifies how an element should float. ◦ The CSS clear property specifies what elements can float beside the cleared element and on which side.
  • 7. float Property ◦ The float property is used for positioning and formatting content e.g. let an image float left to the text in a container. ◦ The float property can have one of the following values: ◦ left - The element floats to the left of its container ◦ right - The element floats to the right of its container ◦ none - The element does not float (will be displayed just where it occurs in the text). This is default ◦ inherit - The element inherits the float value of its parent ◦ In its simplest use, the float property can be used to wrap text around images.
  • 8. clear Property ◦ When we use the float property, and we want the next element below (not on right or left), we will have to use the clear property. ◦ The clear property specifies what should happen with the element that is next to a floating element. ◦ The clear property can have one of the following values: ◦ none - The element is not pushed below left or right floated elements. This is default ◦ left - The element is pushed below left floated elements ◦ right - The element is pushed below right floated elements ◦ both - The element is pushed below both left and right floated elements ◦ inherit - The element inherits the clear value from its parent
  • 9. CSS Units ◦ CSS Units ◦ CSS has several different units for expressing a length. ◦ Many CSS properties take "length" values, such as width, margin, padding, font-size, etc. ◦ Length is a number followed by a length unit, such as 10px, 2em, etc. ◦ Absolute ◦ Relative
  • 10. Absolute Lengths ◦ The absolute length units are fixed and a length expressed in any of these will appear as exactly that size. ◦ Absolute length units are not recommended for use on screen, because screen sizes vary so much. However, they can be used if the output medium is known, such as for print layout. cm centimeters mm millimeters in inches (1in = 96px = 2.54cm) px * pixels (1px = 1/96th of 1in) pt points (1pt = 1/72 of 1in) pc picas (1pc = 12 pt)
  • 11. Relative Lengths Relative length units specify a length relative to another length property. Relative length units scale better between different rendering medium. Unit Description em Relative to the font-size of the element (2em means 2 times the size of the current font) rem Relative to font-size of the root element vw Relative to 1% of the width of the viewport* vh Relative to 1% of the height of the viewport* % Relative to the parent element
  • 12. CSS box-shadow Property ◦ The box-shadow property attaches one or more shadows to an element. ◦ Syntax: box-shadow: 10px 10px grey;
  • 13. CSS text-shadow Property ◦ The text-shadow property adds shadow to text. ◦ This property accepts a comma-separated list of shadows to be applied to the text. ◦ Syntax: text-shadow: 2px 2px #ff0000;
  • 14. CSS Selectors ◦ CSS element Selector ◦ CSS id Selector ◦ CSS class Selector ◦ CSS Universal Selector ◦ CSS Grouping Selector
  • 15. CSS clip Property ◦ The clip property lets you specify a rectangle to clip an absolutely positioned element. The rectangle is specified as four coordinates, all from the top-left corner of the element to be clipped. ◦ The clip property does not work if "overflow:visible". ◦ Syntax: clip: rect(0px,60px,200px,0px);
  • 16. CSS clip-path Property ◦ The clip-path property lets you clip an element to a basic shape or to an SVG source.
  • 17. CSS Grid Layout Module The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, making it easier to design web pages without having to use floats and positioning. Grid-area property
  • 18. Grid Elements ◦ A grid layout consists of a parent element, with one or more child elements
  • 19. Display Property ◦ An HTML element becomes a grid container when its display property is set to grid or inline- grid. ◦ grid-template-areas ◦ grid-template-columns Property ◦ grid-template-row Property ◦ justify-content ◦ align-content
  • 20. Responsive Web Design ◦ Responsive web design makes your web page look good on all devices. ◦ Responsive web design uses only HTML and CSS. ◦ Responsive web design is not a program or a JavaScript
  • 21. The Viewport ◦ The viewport is the user's visible area of a web page. ◦ The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen. ◦ Setting The Viewport ◦ <meta name="viewport" content="width=device-width, initial-scale=1.0"> ◦ This gives the browser instructions on how to control the page's dimensions and scaling. ◦ The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device). ◦ The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser. ◦
  • 22. Media Queries ◦ Media query is a CSS technique introduced in CSS3. ◦ It uses the @media rule to include a block of CSS properties only if a certain condition is true. ◦ If the browser window is 600px or smaller, the background color will be lightblue: ◦ @media only screen and (max-width: 600px) { body { background-color: lightblue; } } ◦ Always Design for Mobile First ◦ Mobile First means designing for mobile before designing for desktop or any other device (This will make the page display faster on smaller devices).
  • 24. Break Points /* Extra small devices (phones, 600px and down) */ @media only screen and (max-width: 600px) {...} /* Small devices (portrait tablets and large phones, 600px and up) */ @media only screen and (min-width: 600px) {...} /* Medium devices (landscape tablets, 768px and up) */ @media only screen and (min-width: 768px) {...} /* Large devices (laptops/desktops, 992px and up) */ @media only screen and (min-width: 992px) {...} /* Extra large devices (large laptops and desktops, 1200px and up) */ @media only screen and (min-width: 1200px) {...}
  • 25. Orientation: Portrait / Landscape ◦ Media queries can also be used to change layout of a page depending on the orientation of the browser. ◦ @media only screen and (orientation: landscape) { body { background-color: lightblue; } }
  • 26. Hide Elements With Media Queries ◦ Another common use of media queries, is to hide elements on different screen sizes: ◦ /* If the screen size is 600px wide or less, hide the element */ @media only screen and (max-width: 600px) { div.example { display: none; } }
  • 27. Button Styling ◦ Basic Button Styling ◦ Button Colors ◦ Button Sizes ◦ Rounded Buttons ◦ Colored Button Borders ◦ Hoverable Buttons ◦ Shadow Buttons ◦ Disabled Buttons ◦ Animated Buttons
  • 28. Styling Tables ◦ Table Borders ◦ Full-Width Table ◦ Collapse Table Borders ◦ Table Width and Height ◦ Table Alignment ◦ Table Padding ◦ Horizontal Dividers ◦ Hoverable Table ◦ Striped Tables ◦ Table Color
  • 29. CSS transform Property ◦ Rotate ◦ Skew ◦ Scale • translate() • rotate() • scaleX() • scaleY() • scale() • skewX() • skewY() • skew()
  • 30. CSS tranisition property CSS transitions allows you to change property values smoothly, over a given duration. ◦ transition ◦ transition-delay => Delay the Transition Effect ◦ transition-duration ◦ transition-property ◦ transition-timing-function => Specify the Speed Curve of the Transition