SlideShare a Scribd company logo
1 of 25
Building and Marketing Websites
Color
• Computers create the colors you see on a
monitor by combining three colors: red,
green, and blue
• You can create a recipe for a color by telling
the computer how much of the three to mix in
Color Summary
Box Model
Every element in a document, both
block-level and inline, generates a
rectangular element box
Content Dimensions
• Width and height properties to specify the
width and height of the content area of the
element
• Can specify the width and height only of
block-level elements and non-text inline
elements such as images
Specifying Height
• Less common to specify the height of
elements
• Overflow property lets you specify what to do
with text that doesn’t fit
<style type=“text/css”>
p {
height: 100px;
overflow: auto;
}
</style>
Overflow Values
Padding
• Space between the content area and the
border
Specifying Padding
• padding-top, padding-right, padding-bottom,
padding-left
<style type=“text/css”>
p {
padding-top: 5em;
padding-right: 2em;
padding-bottom: 4em;
padding-left: 1em;
}
</style>
<style type=“text/css”>
p {
padding-top: 5em;
padding-right: 2em;
padding-bottom: 4em;
padding-left: 1em;
}
</style>
Padding Shorthand
• 1 value : padding: 10px;
– Applied to all sides.
• 2 values : padding: 10px 6px;
– First is top and bottom;
– Second is left and right.
• 3 values : padding: 10px 6px 4px;
– First is top;
– Second is left and right;
– Third is bottom.
• 4 values : padding: 10px 6px 4px 10px;
– Applied clockwise to top, right, bottom, and left edges
consecutively
– (TRBL).
Border
• Line that surrounds the element and its
padding.
• Optional.
Specifying Border Style
• Property : border-style
– Values: Dotted, dashed, solid, double, groove,
ridge, inset, outset
• More properties: border-top-style, border-
right-style, border-bottom-style, border-left-
style
p {
border-top-style: solid;
border-right-style: dashed;
border-bottom-style: double;
border-left-style: dotted;
width: 300px;
height: 100px;
}
Specifying Border Width
• Property: border-width
– Values: length units, thin, medium, thick
• More properties: border-top-width, border-
right-width, border-bottom-width, border-
left-width
Specifying Border Color
• Property: border-color
• More Properties: border-top-color, border-
right-color, border-bottom-color, border-left-
color
Specifying Border
• You can provide style, width, and color values
in one declaration
p {
border: 1px dashed #F26521;
}
Specifying Border
• Can also use: border-top, border-right,
border-bottom, border-left
• Values for properties may include style, width,
and color values in any order.
• If the border style value is omitted, no border
will show.
Margin
• Space added on the outside of the border
• Optional.
Specifying Margin
• Similar to padding
• margin-top, margin-right, margin-bottom,
margin-left
• Same short hands as padding apply
Margins
• The top and bottom margins of neighboring
elements collapse.
• Instead of accumulating, adjacent margins
overlap, and only the largest value will be
used
Margins
• Only horizontal margins are rendered on
inline text elements
• For non-text inline elements, margins
rendered on all sides.

More Related Content

Viewers also liked

Searching over the past, present and future
Searching over the past, present and futureSearching over the past, present and future
Searching over the past, present and futureRoi Blanco
 
Tmh5 rahasia-kitab-tujuh
Tmh5 rahasia-kitab-tujuhTmh5 rahasia-kitab-tujuh
Tmh5 rahasia-kitab-tujuhRidwan Gucci
 
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...Verina Ingram
 
HRM CityMatters Survey Results - November 2013
HRM CityMatters Survey Results - November 2013 HRM CityMatters Survey Results - November 2013
HRM CityMatters Survey Results - November 2013 Halifax Partnership
 
Workshops Red ArgenTIna IT 2015 - Propuesta de Sponsoreo
Workshops Red ArgenTIna IT 2015 - Propuesta de SponsoreoWorkshops Red ArgenTIna IT 2015 - Propuesta de Sponsoreo
Workshops Red ArgenTIna IT 2015 - Propuesta de SponsoreoCESSI ArgenTIna
 
Caching Search Engine Results over Incremental Indices
Caching Search Engine Results over Incremental IndicesCaching Search Engine Results over Incremental Indices
Caching Search Engine Results over Incremental IndicesRoi Blanco
 
Destination pluto
Destination plutoDestination pluto
Destination plutoLisa Baird
 
Halifax’s Finance and Insurance Industry: Our Opportunity
Halifax’s Finance and Insurance Industry: Our OpportunityHalifax’s Finance and Insurance Industry: Our Opportunity
Halifax’s Finance and Insurance Industry: Our OpportunityHalifax Partnership
 
Responsible Disclosure - For Dutch ISACA chapter
Responsible Disclosure - For Dutch ISACA chapterResponsible Disclosure - For Dutch ISACA chapter
Responsible Disclosure - For Dutch ISACA chapterFrank Breedijk
 
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia Halifax Partnership
 
The ancient middle east mesopotamian literature2
The ancient middle east  mesopotamian literature2The ancient middle east  mesopotamian literature2
The ancient middle east mesopotamian literature2sparky31522
 
Present simple vs. present continuous
Present simple vs. present continuousPresent simple vs. present continuous
Present simple vs. present continuousAlexandra Canal
 
Windows one - a platform that will merge Windows Phone, Windows RT and Window...
Windows one - a platform that will merge Windows Phone, Windows RT and Window...Windows one - a platform that will merge Windows Phone, Windows RT and Window...
Windows one - a platform that will merge Windows Phone, Windows RT and Window...Ankur Jain
 
Englishtestunit73 eso d-2
Englishtestunit73 eso d-2Englishtestunit73 eso d-2
Englishtestunit73 eso d-2Vicky
 

Viewers also liked (18)

Searching over the past, present and future
Searching over the past, present and futureSearching over the past, present and future
Searching over the past, present and future
 
Tmh5 rahasia-kitab-tujuh
Tmh5 rahasia-kitab-tujuhTmh5 rahasia-kitab-tujuh
Tmh5 rahasia-kitab-tujuh
 
2014 Halifax Index Presentation
2014 Halifax Index Presentation2014 Halifax Index Presentation
2014 Halifax Index Presentation
 
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...
The Fuelwood Market Chain of Kinshasa: Socio-economic and sustainability outc...
 
Mission mars
Mission mars Mission mars
Mission mars
 
HRM CityMatters Survey Results - November 2013
HRM CityMatters Survey Results - November 2013 HRM CityMatters Survey Results - November 2013
HRM CityMatters Survey Results - November 2013
 
Workshops Red ArgenTIna IT 2015 - Propuesta de Sponsoreo
Workshops Red ArgenTIna IT 2015 - Propuesta de SponsoreoWorkshops Red ArgenTIna IT 2015 - Propuesta de Sponsoreo
Workshops Red ArgenTIna IT 2015 - Propuesta de Sponsoreo
 
Caching Search Engine Results over Incremental Indices
Caching Search Engine Results over Incremental IndicesCaching Search Engine Results over Incremental Indices
Caching Search Engine Results over Incremental Indices
 
Destination pluto
Destination plutoDestination pluto
Destination pluto
 
Halifax’s Finance and Insurance Industry: Our Opportunity
Halifax’s Finance and Insurance Industry: Our OpportunityHalifax’s Finance and Insurance Industry: Our Opportunity
Halifax’s Finance and Insurance Industry: Our Opportunity
 
GREEN DIWALI
GREEN DIWALIGREEN DIWALI
GREEN DIWALI
 
Media evaluation
Media evaluationMedia evaluation
Media evaluation
 
Responsible Disclosure - For Dutch ISACA chapter
Responsible Disclosure - For Dutch ISACA chapterResponsible Disclosure - For Dutch ISACA chapter
Responsible Disclosure - For Dutch ISACA chapter
 
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia
AGREATERHalifax - the 2011-16 Economic Strategy for Halifax, Nova Scotia
 
The ancient middle east mesopotamian literature2
The ancient middle east  mesopotamian literature2The ancient middle east  mesopotamian literature2
The ancient middle east mesopotamian literature2
 
Present simple vs. present continuous
Present simple vs. present continuousPresent simple vs. present continuous
Present simple vs. present continuous
 
Windows one - a platform that will merge Windows Phone, Windows RT and Window...
Windows one - a platform that will merge Windows Phone, Windows RT and Window...Windows one - a platform that will merge Windows Phone, Windows RT and Window...
Windows one - a platform that will merge Windows Phone, Windows RT and Window...
 
Englishtestunit73 eso d-2
Englishtestunit73 eso d-2Englishtestunit73 eso d-2
Englishtestunit73 eso d-2
 

Similar to Pres (20)

Dimensions of elements.pdf
Dimensions of elements.pdfDimensions of elements.pdf
Dimensions of elements.pdf
 
CSS tutorial chapter 2
CSS tutorial chapter 2CSS tutorial chapter 2
CSS tutorial chapter 2
 
Chapter 14: Box Model
Chapter 14: Box ModelChapter 14: Box Model
Chapter 14: Box Model
 
Css3
Css3Css3
Css3
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2
 
Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4Introduction to CSS Borders - Lesson 4
Introduction to CSS Borders - Lesson 4
 
Border
BorderBorder
Border
 
Css borders
Css bordersCss borders
Css borders
 
Css summary
Css summaryCss summary
Css summary
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
Web Development - Lecture 6
Web Development - Lecture 6Web Development - Lecture 6
Web Development - Lecture 6
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
 
Css
CssCss
Css
 
css3.pptx
css3.pptxcss3.pptx
css3.pptx
 
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
 
Css2
Css2Css2
Css2
 
Css2
Css2Css2
Css2
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
 
Layouts
Layouts Layouts
Layouts
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt
 

More from Andrey L

More from Andrey L (7)

Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Intro 1 sept_14_2010
Intro 1 sept_14_2010Intro 1 sept_14_2010
Intro 1 sept_14_2010
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Pres

  • 2. Color • Computers create the colors you see on a monitor by combining three colors: red, green, and blue • You can create a recipe for a color by telling the computer how much of the three to mix in
  • 5. Every element in a document, both block-level and inline, generates a rectangular element box
  • 6.
  • 7. Content Dimensions • Width and height properties to specify the width and height of the content area of the element • Can specify the width and height only of block-level elements and non-text inline elements such as images
  • 8. Specifying Height • Less common to specify the height of elements • Overflow property lets you specify what to do with text that doesn’t fit
  • 9. <style type=“text/css”> p { height: 100px; overflow: auto; } </style>
  • 11. Padding • Space between the content area and the border
  • 12. Specifying Padding • padding-top, padding-right, padding-bottom, padding-left <style type=“text/css”> p { padding-top: 5em; padding-right: 2em; padding-bottom: 4em; padding-left: 1em; } </style>
  • 13. <style type=“text/css”> p { padding-top: 5em; padding-right: 2em; padding-bottom: 4em; padding-left: 1em; } </style>
  • 14. Padding Shorthand • 1 value : padding: 10px; – Applied to all sides. • 2 values : padding: 10px 6px; – First is top and bottom; – Second is left and right. • 3 values : padding: 10px 6px 4px; – First is top; – Second is left and right; – Third is bottom. • 4 values : padding: 10px 6px 4px 10px; – Applied clockwise to top, right, bottom, and left edges consecutively – (TRBL).
  • 15. Border • Line that surrounds the element and its padding. • Optional.
  • 16. Specifying Border Style • Property : border-style – Values: Dotted, dashed, solid, double, groove, ridge, inset, outset • More properties: border-top-style, border- right-style, border-bottom-style, border-left- style
  • 17. p { border-top-style: solid; border-right-style: dashed; border-bottom-style: double; border-left-style: dotted; width: 300px; height: 100px; }
  • 18. Specifying Border Width • Property: border-width – Values: length units, thin, medium, thick • More properties: border-top-width, border- right-width, border-bottom-width, border- left-width
  • 19. Specifying Border Color • Property: border-color • More Properties: border-top-color, border- right-color, border-bottom-color, border-left- color
  • 20. Specifying Border • You can provide style, width, and color values in one declaration p { border: 1px dashed #F26521; }
  • 21. Specifying Border • Can also use: border-top, border-right, border-bottom, border-left • Values for properties may include style, width, and color values in any order. • If the border style value is omitted, no border will show.
  • 22. Margin • Space added on the outside of the border • Optional.
  • 23. Specifying Margin • Similar to padding • margin-top, margin-right, margin-bottom, margin-left • Same short hands as padding apply
  • 24. Margins • The top and bottom margins of neighboring elements collapse. • Instead of accumulating, adjacent margins overlap, and only the largest value will be used
  • 25. Margins • Only horizontal margins are rendered on inline text elements • For non-text inline elements, margins rendered on all sides.