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 (10)

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
 
Web Layout
Web LayoutWeb Layout
Web Layout
Shawn Calvert
 
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
 
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
 
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
 
Ad

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
 
Ad

Recently uploaded (20)

Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 

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