SlideShare a Scribd company logo
WDS
CS KKU
322 432 Web Design Technology
By Yaowaluck Promdee, Sumonta Kasemvilas
Computer Science Khon Kaen University
CSS Box Model
Margin, Padding and Border
Web Design Technology -2015 1
WDS
CS KKU
Web Design Technology -2015 2
Index
•  CSS Border
•  Outline
•  Box model
•  Margin
•  Padding
•  Example
LAB#7
WDS
CS KKU
Web Design Technology -2015 3
margin-bottom
margin-right
margin-left
margin-top
border-bottom
border-right
border-top
border-left
padding-left
padding-top
padding-right
padding-bottom
Clears an area outside the border.
The margin is transparent
Border – A border that goes around the padding and content
Clears an area around the content.
The padding is transparent
ß------------ width---------------
à
ß------height--------à
The content of the box,
where text and images
appear
CSS Box Model
WDS
CS KKU
Web Design Technology -2015 4
Border
border-width is used to set the
width of the border
border-style The border-style
property specifies
what kind of
border to display
none, hidden,
dotted, dashed,
solid, double,
groove, ridge,
inset, outset
value
{!
WDS
CS KKU
Web Design Technology -2015 5
Border
•  border-top-width
•  border-top-style
•  border-top-color
•  border-top
•  border-bottom-width
•  border-bottom-style
•  border-bottom-color
•  border-bottom
Sets all the top
border properties
Sets all the bottom
border properties
WDS
CS KKU
Web Design Technology -2015 6
Border
•  border-right-width
•  border-right-style
•  border-right-color
•  border-right
•  border-left-width
•  border-left-style
•  border-left-color
•  border-left
Sets all the left
border properties
Sets all the right
border properties
WDS
CS KKU
Web Design Technology -2015 7
CSS3 Border
•  border-radius
•  box-shadow
box-shadow: 10px 10px 5px #888888;
WDS
CS KKU
Web Design Technology -2015 8
CSS3 Border
•  border-image
border-image:url(border.png) 30 30 round;
-webkit-border-image:url(border.png) 30 30 round;
/* Safari 5 and older */
-o-border-image:url(border.png) 30 30 round;
/* Opera */
WDS
CS KKU
9
Outline
p {
border: 1px solid red;
outline-style: dotted;
outline-color: #00ff00;
}
Web Design Technology -2015
WDS
CS KKU
Web Design Technology -2015 10
Outline
p {
border: 1px solid red;
outline: green dotted thick;
}
Sets all the outline properties in one
declaration
outline-color
outline-style
outline-width
inherit
Web Design Technology -2015 11
WDS
CS KKU
Example1
This is output. How to code like this?
WDS
CS KKU
Web Design Technology -2015 12
Lists
Lists
•  unordered lists (<ul>) - the list items are marked with bullets
•  ordered lists (<ol>) - the list items are marked with numbers or letters
ol.c { list-style-type: upper-roman; }
ol.d { list-style-type: lower-alpha;}
ul.a {list-style-type: circle; }
ul.b { list-style-type: square;}
o  CSS
o  HTML
I.  CSS
II.  HTML
§  CSS
§  HTML
a.  CSS
b.  HTML
Try it more
WDS
CS KKU
Web Design Technology -2015 13
Margin
The CSS margin properties define the space around elements.
p { margin: 10px 20px 30px 40px; }
/* shortcut margin changed the top 10px, right 20px, bottom 30px and
left margin 40px. */
h1 { margin: 10px; }
h2 { margin: 10px 20px 30px; }
h2 { margin: 10px 20px; }
top right bottom
set all
top and bottom 10px
right and left 20px
Web Design Technology -2015 14
WDS
CS KKU
Example2
Use the margin property to set the top and bottom margins for <h1>
to “10%", and left and right margins to “30%".
p set margin all 10% and border width 3px solid.
WDS
CS KKU
Web Design Technology -2015 15
Padding
The CSS padding properties define the space between the element border
and the element content.
p { padding: 10px 20px 30px 40px; }
/* shortcut padding changed the top 10px, right 20px, bottom 30px and
left margin 40px. */
h1 {padding: 10px; }
h2 { padding: 10px 20px 30px; }
h2 { padding: 10px 20px; }
top right bottom
set all
top and bottom 10px
right and left 20px
WDS
CS KKU
Web Design Technology -2015 16
Example3
Web Design Technology -2015 17
WDS
CS KKU
Create four web pages by display results as
shown in example 1-4.
- You have to finish this assignment in lab hour.
-- Zip All Files > Example 1-4 and name
“Lab7_YourID_Section.zip”
Example4

More Related Content

What's hot

Navigation and Link
Navigation and LinkNavigation and Link
Navigation and Link
Yaowaluck Promdee
 
Good/Bad Web Design
Good/Bad Web DesignGood/Bad Web Design
Good/Bad Web Design
Yaowaluck Promdee
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
Russ Weakley
 
0x06-CSS-texto.pdf
0x06-CSS-texto.pdf0x06-CSS-texto.pdf
0x06-CSS-texto.pdf
Ronald Alexander Rivero
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Vladimir Zhidal
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
 
Rwd ppt
Rwd pptRwd ppt
Rwd ppt
Suresh B
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
Aanand Bohara
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
Rachel Andrew
 
CSS
CSSCSS
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
NAWAZ KHAN
 
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by StepBootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap Creative
 
Page layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSSPage layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSS
Yaowaluck Promdee
 
Bootstrap 5 ppt
Bootstrap 5 pptBootstrap 5 ppt
Bootstrap 5 ppt
Mallikarjuna G D
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
Adam Soucie
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
Syed Sami
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
Zoe Gillenwater
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 

What's hot (20)

Navigation and Link
Navigation and LinkNavigation and Link
Navigation and Link
 
Good/Bad Web Design
Good/Bad Web DesignGood/Bad Web Design
Good/Bad Web Design
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
0x06-CSS-texto.pdf
0x06-CSS-texto.pdf0x06-CSS-texto.pdf
0x06-CSS-texto.pdf
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Rwd ppt
Rwd pptRwd ppt
Rwd ppt
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
CSS
CSSCSS
CSS
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
 
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by StepBootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
 
Page layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSSPage layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSS
 
Bootstrap 5 ppt
Bootstrap 5 pptBootstrap 5 ppt
Bootstrap 5 ppt
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 

Similar to CSS Boc model

The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP Conference
Rachel Andrew
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Lab#7 CSS Box Model
Lab#7 CSS Box ModelLab#7 CSS Box Model
Lab#7 CSS Box Model
Yaowaluck Promdee
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
Rachel Andrew
 
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
Igalia
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
Sun Technlogies
 
Slides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptxSlides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptx
ahmadraza72678
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflowPeter Kaizer
 
Html css
Html cssHtml css
Html css
kanakaiah kedam
 
IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기
Reagan Hwang
 
Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3
Gil Fink
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSS
Mike Crabb
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
MonkeyDLuffy708724
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
beglee
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSZoe Gillenwater
 
CSS workshop @ OutSystems
CSS workshop @ OutSystemsCSS workshop @ OutSystems
CSS workshop @ OutSystems
Ruben Goncalves
 

Similar to CSS Boc model (20)

CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP Conference
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
 
Lab#7 CSS Box Model
Lab#7 CSS Box ModelLab#7 CSS Box Model
Lab#7 CSS Box Model
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
 
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Slides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptxSlides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptx
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
Html css
Html cssHtml css
Html css
 
The Future of CSS
The Future of CSSThe Future of CSS
The Future of CSS
 
IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기
 
03html Css
03html Css03html Css
03html Css
 
Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3Designing Your Next Generation Web Pages with CSS3
Designing Your Next Generation Web Pages with CSS3
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSS
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
 
Html Css
Html CssHtml Css
Html Css
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
CSS workshop @ OutSystems
CSS workshop @ OutSystemsCSS workshop @ OutSystems
CSS workshop @ OutSystems
 

More from Yaowaluck Promdee

A basic of UX for beginner
A basic of UX for beginnerA basic of UX for beginner
A basic of UX for beginner
Yaowaluck Promdee
 
TCAS 2563
TCAS 2563TCAS 2563
Portfolio design
Portfolio designPortfolio design
Portfolio design
Yaowaluck Promdee
 
Concept to creation story and storyboard
Concept to creation  story and storyboard Concept to creation  story and storyboard
Concept to creation story and storyboard
Yaowaluck Promdee
 
Observation and interviewing
Observation and interviewingObservation and interviewing
Observation and interviewing
Yaowaluck Promdee
 
Requirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvasRequirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvas
Yaowaluck Promdee
 
Good bad design
Good bad designGood bad design
Good bad design
Yaowaluck Promdee
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
Yaowaluck Promdee
 
Graphic, Color and tools
Graphic, Color and toolsGraphic, Color and tools
Graphic, Color and tools
Yaowaluck Promdee
 
Style and Selector Part2
Style and Selector Part2Style and Selector Part2
Style and Selector Part2
Yaowaluck Promdee
 
HTML 5
HTML 5HTML 5
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
Yaowaluck Promdee
 
Web Interface
Web InterfaceWeb Interface
Web Interface
Yaowaluck Promdee
 
Game design
Game designGame design
Game design
Yaowaluck Promdee
 
Powerpoint
Powerpoint Powerpoint
Powerpoint
Yaowaluck Promdee
 
Program Interface
Program Interface Program Interface
Program Interface
Yaowaluck Promdee
 
Mobile Interface
Mobile Interface   Mobile Interface
Mobile Interface
Yaowaluck Promdee
 
Personas and scenario
Personas and scenarioPersonas and scenario
Personas and scenario
Yaowaluck Promdee
 
Ux design process
Ux design processUx design process
Ux design process
Yaowaluck Promdee
 
Graphic Design
Graphic Design Graphic Design
Graphic Design
Yaowaluck Promdee
 

More from Yaowaluck Promdee (20)

A basic of UX for beginner
A basic of UX for beginnerA basic of UX for beginner
A basic of UX for beginner
 
TCAS 2563
TCAS 2563TCAS 2563
TCAS 2563
 
Portfolio design
Portfolio designPortfolio design
Portfolio design
 
Concept to creation story and storyboard
Concept to creation  story and storyboard Concept to creation  story and storyboard
Concept to creation story and storyboard
 
Observation and interviewing
Observation and interviewingObservation and interviewing
Observation and interviewing
 
Requirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvasRequirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvas
 
Good bad design
Good bad designGood bad design
Good bad design
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
 
Graphic, Color and tools
Graphic, Color and toolsGraphic, Color and tools
Graphic, Color and tools
 
Style and Selector Part2
Style and Selector Part2Style and Selector Part2
Style and Selector Part2
 
HTML 5
HTML 5HTML 5
HTML 5
 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
 
Web Interface
Web InterfaceWeb Interface
Web Interface
 
Game design
Game designGame design
Game design
 
Powerpoint
Powerpoint Powerpoint
Powerpoint
 
Program Interface
Program Interface Program Interface
Program Interface
 
Mobile Interface
Mobile Interface   Mobile Interface
Mobile Interface
 
Personas and scenario
Personas and scenarioPersonas and scenario
Personas and scenario
 
Ux design process
Ux design processUx design process
Ux design process
 
Graphic Design
Graphic Design Graphic Design
Graphic Design
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 

CSS Boc model

  • 1. WDS CS KKU 322 432 Web Design Technology By Yaowaluck Promdee, Sumonta Kasemvilas Computer Science Khon Kaen University CSS Box Model Margin, Padding and Border Web Design Technology -2015 1
  • 2. WDS CS KKU Web Design Technology -2015 2 Index •  CSS Border •  Outline •  Box model •  Margin •  Padding •  Example LAB#7
  • 3. WDS CS KKU Web Design Technology -2015 3 margin-bottom margin-right margin-left margin-top border-bottom border-right border-top border-left padding-left padding-top padding-right padding-bottom Clears an area outside the border. The margin is transparent Border – A border that goes around the padding and content Clears an area around the content. The padding is transparent ß------------ width--------------- à ß------height--------à The content of the box, where text and images appear CSS Box Model
  • 4. WDS CS KKU Web Design Technology -2015 4 Border border-width is used to set the width of the border border-style The border-style property specifies what kind of border to display none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset value {!
  • 5. WDS CS KKU Web Design Technology -2015 5 Border •  border-top-width •  border-top-style •  border-top-color •  border-top •  border-bottom-width •  border-bottom-style •  border-bottom-color •  border-bottom Sets all the top border properties Sets all the bottom border properties
  • 6. WDS CS KKU Web Design Technology -2015 6 Border •  border-right-width •  border-right-style •  border-right-color •  border-right •  border-left-width •  border-left-style •  border-left-color •  border-left Sets all the left border properties Sets all the right border properties
  • 7. WDS CS KKU Web Design Technology -2015 7 CSS3 Border •  border-radius •  box-shadow box-shadow: 10px 10px 5px #888888;
  • 8. WDS CS KKU Web Design Technology -2015 8 CSS3 Border •  border-image border-image:url(border.png) 30 30 round; -webkit-border-image:url(border.png) 30 30 round; /* Safari 5 and older */ -o-border-image:url(border.png) 30 30 round; /* Opera */
  • 9. WDS CS KKU 9 Outline p { border: 1px solid red; outline-style: dotted; outline-color: #00ff00; } Web Design Technology -2015
  • 10. WDS CS KKU Web Design Technology -2015 10 Outline p { border: 1px solid red; outline: green dotted thick; } Sets all the outline properties in one declaration outline-color outline-style outline-width inherit
  • 11. Web Design Technology -2015 11 WDS CS KKU Example1 This is output. How to code like this?
  • 12. WDS CS KKU Web Design Technology -2015 12 Lists Lists •  unordered lists (<ul>) - the list items are marked with bullets •  ordered lists (<ol>) - the list items are marked with numbers or letters ol.c { list-style-type: upper-roman; } ol.d { list-style-type: lower-alpha;} ul.a {list-style-type: circle; } ul.b { list-style-type: square;} o  CSS o  HTML I.  CSS II.  HTML §  CSS §  HTML a.  CSS b.  HTML Try it more
  • 13. WDS CS KKU Web Design Technology -2015 13 Margin The CSS margin properties define the space around elements. p { margin: 10px 20px 30px 40px; } /* shortcut margin changed the top 10px, right 20px, bottom 30px and left margin 40px. */ h1 { margin: 10px; } h2 { margin: 10px 20px 30px; } h2 { margin: 10px 20px; } top right bottom set all top and bottom 10px right and left 20px
  • 14. Web Design Technology -2015 14 WDS CS KKU Example2 Use the margin property to set the top and bottom margins for <h1> to “10%", and left and right margins to “30%". p set margin all 10% and border width 3px solid.
  • 15. WDS CS KKU Web Design Technology -2015 15 Padding The CSS padding properties define the space between the element border and the element content. p { padding: 10px 20px 30px 40px; } /* shortcut padding changed the top 10px, right 20px, bottom 30px and left margin 40px. */ h1 {padding: 10px; } h2 { padding: 10px 20px 30px; } h2 { padding: 10px 20px; } top right bottom set all top and bottom 10px right and left 20px
  • 16. WDS CS KKU Web Design Technology -2015 16 Example3
  • 17. Web Design Technology -2015 17 WDS CS KKU Create four web pages by display results as shown in example 1-4. - You have to finish this assignment in lab hour. -- Zip All Files > Example 1-4 and name “Lab7_YourID_Section.zip” Example4