SlideShare a Scribd company logo
Up here

BEGINNING HTML AND CSS
CLASS 4

HTML/CSS ~ Girl Develop It ~
WHAT WE'LL LEARN IN THIS SECTION
Positioning elements with CSS
Static position
Relative position
Absolute position
The "float" property
POSITIONING
The placement of elements on your webpage
The default position is called "static"
STATIC POSITIONING FOR INLINE
ELEMENTS
In normal flow, inline boxes flow from left to right, wrapping
to next line when needed.
<m sc"mgscoi1pg/
ig r=iae/oke.n">
<m sc"mgscoi2pg/
ig r=iae/oke.n">
<m sc"mgscoi3pg/
ig r=iae/oke.n">
..
.
<m sc"mgscoi2pg/
ig r=iae/oke.n">
<m sc"mgscoi3pg/
ig r=iae/oke.n">
STATIC POSITIONING FOR BLOCK
ELEMENTS
In normal flow, block boxes flow from top to bottom,
making a new line after every box.
<>reig<p
pGetns/>
<>el<p
pHlo/>
<>itee<p
pH hr!/>

Greetings
Hello
Hi there!
RELATIVE POSITIONING
Tells an element to be displayed in a different place
relative to its static position.
How? By defining where the top, right, bottom, or left edge
should be.
The elements around it behave like it is still in the static
spot.
RELATIVE POSITIONING
Example:
.eaie
rltv{
psto:rltv;
oiin eaie
lf:8p;
et 0x
tp 2p;
o: 0x
hih:10x
egt 0p;
bcgon-oo:ylo;
akrudclr elw
}

This sentence "sees" the relatively positioned div as if it
were still in its static position.
Hello, hi!
This sentence does the same.
ABSOLUTE POSITIONING
Tells an element exactly where you want it placed within
a defined container element.
You define the container element by giving it a position
of "relative".
Use the top, bottom, left, or right of the defined container
as coordinates.
Other elements completely ignore the absolutely
positioned element.
ABSOLUTE POSITIONING
Example:
.o{
tp
psto:aslt;
oiin boue
tp -0x
o: 2p;
rgt 4p;
ih: 0x
bcgon-oo:ylo
akrudclr elw
}

.otm
bto{
psto:aslt;
oiin boue
bto:-0x
otm 2p;
lf:0x
et6p;
bcgon-oo:gen
akrudclr re
}
EXAMPLE: ABSOLUTE POSITIONING
Here's an example of an
image with a caption
absolutely positioned over
top of it.
The containing div has a
position of relative, and
the caption has a position
of absolute.
Z­INDEX
When positioned elements overlap others, use "z-index" to
define "who's on top".
The element with highest z-index goes on top.
.otm
bto{
psto:aslt;
oiin boue
bto:1p;
otm 0x
lf:0x
et6p;
bcgon-oo:ylo;
akrudclr elw
zidx 1
-ne: ;
}

.o{
tp
psto:aslt;
oiin boue
bto:1p;
otm 5x
lf:0x
et6p;
bcgon-oo:gen
akrudclr re;
zidx 2
-ne: ;
}
LET'S SEE A DEMO!
FLOAT
"Floating" an element causes it to move left or right till it
bumps against another element or its container.
Elements below it will "rise up" to fill the space it
vacated.
Inline elements and text will make room for the floated
element by wrapping.
FLOAT: EXAMPLE
Below a <blockquote> is floated to the left, allowing text to
wrap around it on the right
FLOAT
.la{
fot
fotlf;
la:et
wdh20x
it:0p;
bcgon:elw
akrudylo;
}

Inline content wraps around the
floated div. The parent div
containing the inline content occupies all
the space behind the "float". The inline content moves over
to make room.
Hi, I'm a yellow box
with black text.
I like to hang out on
the left side.
USING FLOATS TO PLACE ELEMENTS SIDE
BY SIDE
If you want two block elements to be side by side:
float both elements.
give them the same "float" value.
give them widths.
CLEAR
The "clear" property tells the element not to "rise up"
behind the floated div.
"Clear: right" tells the element not to rise up behind a
right-floated element.
"Clear: left" tells the element not to rise up behind a leftfloated element.
There is also "clear: both" and "clear: none"
CLEAR
.la{
fot
fotlf;
la:et
wdh5p;
it:0x
bcgon:elw
akrudylo;
}
.la-et
cerlf{
cerlf
la:et
}

hi This element has no clear property.
hi This element has no clear property.
hi
This element has a class of .clear-left
Floated elements and the elements around them often
behave unexpectedly!
Floated elements get "hung up" underneath others.
If all the contents of a div are floated, the div collapses.
A div that "rises up" below a floated div will sometimes
leave its content stuck below.
Despite its shortcomings, the "float" property is used
extensively.
For a good slideshow explaining floats, go to:
http://www.slideshare.net/maxdesign/css-floats-explained
LET'S DEMO IT
QUESTIONS?

?
Top here
Bottom
Down

More Related Content

Viewers also liked (10)

Barangay san agustin 2
Barangay san agustin 2Barangay san agustin 2
Barangay san agustin 2
Rhema Anne
 
Csis110 trzos-c1 ms access
Csis110 trzos-c1 ms accessCsis110 trzos-c1 ms access
Csis110 trzos-c1 ms access
tomtrzos
 
 Instructional Design for the Active: Employing Interactive Technologies and...
	Instructional Design for the Active: Employing Interactive Technologies and...	Instructional Design for the Active: Employing Interactive Technologies and...
 Instructional Design for the Active: Employing Interactive Technologies and...
Anthony Holderied
 
melssCRM brochure
melssCRM brochuremelssCRM brochure
melssCRM brochure
morrisraja
 
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Anthony Holderied
 
Galane gold company presentation
Galane gold company presentationGalane gold company presentation
Galane gold company presentation
GalaneGold
 
 Creating Effective Research Assignments: Bridging the Gap Between Students ...
	Creating Effective Research Assignments: Bridging the Gap Between Students ...	Creating Effective Research Assignments: Bridging the Gap Between Students ...
 Creating Effective Research Assignments: Bridging the Gap Between Students ...
Anthony Holderied
 
Management Presentation
Management PresentationManagement Presentation
Management Presentation
GalaneGold
 
PhD Dissertation Powerpoint
PhD Dissertation PowerpointPhD Dissertation Powerpoint
PhD Dissertation Powerpoint
Hemal Mehta
 
Communication as a process 25 06-2012 4-47pm
Communication as a process 25 06-2012 4-47pmCommunication as a process 25 06-2012 4-47pm
Communication as a process 25 06-2012 4-47pm
lisahli.opiyo
 
Barangay san agustin 2
Barangay san agustin 2Barangay san agustin 2
Barangay san agustin 2
Rhema Anne
 
Csis110 trzos-c1 ms access
Csis110 trzos-c1 ms accessCsis110 trzos-c1 ms access
Csis110 trzos-c1 ms access
tomtrzos
 
 Instructional Design for the Active: Employing Interactive Technologies and...
	Instructional Design for the Active: Employing Interactive Technologies and...	Instructional Design for the Active: Employing Interactive Technologies and...
 Instructional Design for the Active: Employing Interactive Technologies and...
Anthony Holderied
 
melssCRM brochure
melssCRM brochuremelssCRM brochure
melssCRM brochure
morrisraja
 
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Introducing NCLOR: Finding, Using, and Sharing Digital Learning Objects.
Anthony Holderied
 
Galane gold company presentation
Galane gold company presentationGalane gold company presentation
Galane gold company presentation
GalaneGold
 
 Creating Effective Research Assignments: Bridging the Gap Between Students ...
	Creating Effective Research Assignments: Bridging the Gap Between Students ...	Creating Effective Research Assignments: Bridging the Gap Between Students ...
 Creating Effective Research Assignments: Bridging the Gap Between Students ...
Anthony Holderied
 
Management Presentation
Management PresentationManagement Presentation
Management Presentation
GalaneGold
 
PhD Dissertation Powerpoint
PhD Dissertation PowerpointPhD Dissertation Powerpoint
PhD Dissertation Powerpoint
Hemal Mehta
 
Communication as a process 25 06-2012 4-47pm
Communication as a process 25 06-2012 4-47pmCommunication as a process 25 06-2012 4-47pm
Communication as a process 25 06-2012 4-47pm
lisahli.opiyo
 

Similar to GDI Seattle Intro to HTML and CSS - Class 4 (13)

Css Positioning Elements
Css Positioning ElementsCss Positioning Elements
Css Positioning Elements
sanjay2211
 
Css advanced – session 4
Css advanced – session 4Css advanced – session 4
Css advanced – session 4
Dr. Ramkumar Lakshminarayanan
 
animation for designing elements and botto
animation for designing elements and bottoanimation for designing elements and botto
animation for designing elements and botto
zahidyousuf9
 
Fundamentals of Browser Rendering Css Overview PT 2
Fundamentals of Browser Rendering Css Overview PT 2Fundamentals of Browser Rendering Css Overview PT 2
Fundamentals of Browser Rendering Css Overview PT 2
Barak Drechsler
 
Web Layout
Web LayoutWeb Layout
Web Layout
Shawn Calvert
 
1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning
apnwebdev
 
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Diego Eis
 
CSS_Dibbo
CSS_DibboCSS_Dibbo
CSS_Dibbo
Sayanton Vhaduri
 
CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)
Rafi Haidari
 
Exp13 write up
Exp13 write upExp13 write up
Exp13 write up
Ankit Dubey
 
ClaFundamentalsof Web Developmentss12 .pdf
ClaFundamentalsof Web Developmentss12 .pdfClaFundamentalsof Web Developmentss12 .pdf
ClaFundamentalsof Web Developmentss12 .pdf
kasperkey106
 
Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning
Steve Guinan
 
Abscddnddmdkwkkstack implementation.pptx
Abscddnddmdkwkkstack implementation.pptxAbscddnddmdkwkkstack implementation.pptx
Abscddnddmdkwkkstack implementation.pptx
zainshahid3040
 
Css Positioning Elements
Css Positioning ElementsCss Positioning Elements
Css Positioning Elements
sanjay2211
 
animation for designing elements and botto
animation for designing elements and bottoanimation for designing elements and botto
animation for designing elements and botto
zahidyousuf9
 
Fundamentals of Browser Rendering Css Overview PT 2
Fundamentals of Browser Rendering Css Overview PT 2Fundamentals of Browser Rendering Css Overview PT 2
Fundamentals of Browser Rendering Css Overview PT 2
Barak Drechsler
 
1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning
apnwebdev
 
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Diego Eis
 
CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)
Rafi Haidari
 
ClaFundamentalsof Web Developmentss12 .pdf
ClaFundamentalsof Web Developmentss12 .pdfClaFundamentalsof Web Developmentss12 .pdf
ClaFundamentalsof Web Developmentss12 .pdf
kasperkey106
 
Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning
Steve Guinan
 
Abscddnddmdkwkkstack implementation.pptx
Abscddnddmdkwkkstack implementation.pptxAbscddnddmdkwkkstack implementation.pptx
Abscddnddmdkwkkstack implementation.pptx
zainshahid3040
 

More from Heather Rock (7)

GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1
Heather Rock
 
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 SlidesGDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3
Heather Rock
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 
GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1
Heather Rock
 
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 SlidesGDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3
Heather Rock
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 

Recently uploaded (20)

Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 

GDI Seattle Intro to HTML and CSS - Class 4

  • 1. Up here BEGINNING HTML AND CSS CLASS 4 HTML/CSS ~ Girl Develop It ~
  • 2. WHAT WE'LL LEARN IN THIS SECTION Positioning elements with CSS Static position Relative position Absolute position The "float" property
  • 3. POSITIONING The placement of elements on your webpage The default position is called "static"
  • 4. STATIC POSITIONING FOR INLINE ELEMENTS In normal flow, inline boxes flow from left to right, wrapping to next line when needed. <m sc"mgscoi1pg/ ig r=iae/oke.n"> <m sc"mgscoi2pg/ ig r=iae/oke.n"> <m sc"mgscoi3pg/ ig r=iae/oke.n"> .. . <m sc"mgscoi2pg/ ig r=iae/oke.n"> <m sc"mgscoi3pg/ ig r=iae/oke.n">
  • 5. STATIC POSITIONING FOR BLOCK ELEMENTS In normal flow, block boxes flow from top to bottom, making a new line after every box. <>reig<p pGetns/> <>el<p pHlo/> <>itee<p pH hr!/> Greetings Hello Hi there!
  • 6. RELATIVE POSITIONING Tells an element to be displayed in a different place relative to its static position. How? By defining where the top, right, bottom, or left edge should be. The elements around it behave like it is still in the static spot.
  • 7. RELATIVE POSITIONING Example: .eaie rltv{ psto:rltv; oiin eaie lf:8p; et 0x tp 2p; o: 0x hih:10x egt 0p; bcgon-oo:ylo; akrudclr elw } This sentence "sees" the relatively positioned div as if it were still in its static position. Hello, hi! This sentence does the same.
  • 8. ABSOLUTE POSITIONING Tells an element exactly where you want it placed within a defined container element. You define the container element by giving it a position of "relative". Use the top, bottom, left, or right of the defined container as coordinates. Other elements completely ignore the absolutely positioned element.
  • 9. ABSOLUTE POSITIONING Example: .o{ tp psto:aslt; oiin boue tp -0x o: 2p; rgt 4p; ih: 0x bcgon-oo:ylo akrudclr elw } .otm bto{ psto:aslt; oiin boue bto:-0x otm 2p; lf:0x et6p; bcgon-oo:gen akrudclr re }
  • 10. EXAMPLE: ABSOLUTE POSITIONING Here's an example of an image with a caption absolutely positioned over top of it. The containing div has a position of relative, and the caption has a position of absolute.
  • 11. Z­INDEX When positioned elements overlap others, use "z-index" to define "who's on top". The element with highest z-index goes on top. .otm bto{ psto:aslt; oiin boue bto:1p; otm 0x lf:0x et6p; bcgon-oo:ylo; akrudclr elw zidx 1 -ne: ; } .o{ tp psto:aslt; oiin boue bto:1p; otm 5x lf:0x et6p; bcgon-oo:gen akrudclr re; zidx 2 -ne: ; }
  • 12. LET'S SEE A DEMO!
  • 13. FLOAT "Floating" an element causes it to move left or right till it bumps against another element or its container. Elements below it will "rise up" to fill the space it vacated. Inline elements and text will make room for the floated element by wrapping.
  • 14. FLOAT: EXAMPLE Below a <blockquote> is floated to the left, allowing text to wrap around it on the right
  • 15. FLOAT .la{ fot fotlf; la:et wdh20x it:0p; bcgon:elw akrudylo; } Inline content wraps around the floated div. The parent div containing the inline content occupies all the space behind the "float". The inline content moves over to make room. Hi, I'm a yellow box with black text. I like to hang out on the left side.
  • 16. USING FLOATS TO PLACE ELEMENTS SIDE BY SIDE If you want two block elements to be side by side: float both elements. give them the same "float" value. give them widths.
  • 17. CLEAR The "clear" property tells the element not to "rise up" behind the floated div. "Clear: right" tells the element not to rise up behind a right-floated element. "Clear: left" tells the element not to rise up behind a leftfloated element. There is also "clear: both" and "clear: none"
  • 18. CLEAR .la{ fot fotlf; la:et wdh5p; it:0x bcgon:elw akrudylo; } .la-et cerlf{ cerlf la:et } hi This element has no clear property. hi This element has no clear property. hi This element has a class of .clear-left
  • 19. Floated elements and the elements around them often behave unexpectedly! Floated elements get "hung up" underneath others. If all the contents of a div are floated, the div collapses. A div that "rises up" below a floated div will sometimes leave its content stuck below.
  • 20. Despite its shortcomings, the "float" property is used extensively. For a good slideshow explaining floats, go to: http://www.slideshare.net/maxdesign/css-floats-explained