SlideShare a Scribd company logo
1 of 15
Class 10
Normal Flow Browser display of elements in the order they are coded in the Web page document Figure 6.6 Figure 6.5
Relative Positioning    Changes the location of an element in relation to where it would otherwise appear 3 h1 { background-color:#cccccc; 	padding:5px; 	color: #000000; } #myContent { position: relative; 	left:30px; 	font-family:Arial,sans-serif; }
Absolute Positioning    Precisely specifies the location of an element in the browser window 4 h1 { background-color:#cccccc; 	padding:5px; 	color: #000000; } #content {position: absolute; 	left:200; 	top:100; 	font-family:Arial,sans-serif; 	width:300; }
Absolute Positioning Example
float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using the float property. 6 h1 { background-color:#cccccc; 	padding:5px; 	color: #000000; } p { font-family:Arial,sans-serif; } #yls {float:right; 	margin: 0 0 5px 5px; 	border: solid; }
clear Property The h2 text is displayed in normal flow. Useful to “clear” or terminate a float Values are left, right, and both clear: left; was applied to the h2. Now the h2 text displays AFTER the floated image.
overflow Property The background does not extend as far as you’d expect. Intended to configure the display of elements on a Web page.  However,  it is useful to “clear” or terminate a float before the end of a container element Values are auto, hidden, and scroll overflow: auto; was applied to the div that contains the image and paragraph. Now the background extends and the  h2 text displays AFTER the floated image.
Display Property Configures how and if an element is displayed  display:none ; The element will not be displayed. display:block ; The element is rendered as a block element – even if it is actually an inline element,such as a hyperlink. display:inline; The element will be rendered as an inline element – even if it is actually a block element – such as a <li>. You’ll work with the display property in Hands-On Practice 6.6 and in Chapter 7. 9
Z-Index Property Modifies the stacking order of elements on a Web page. default z-index value is “0” Elements with higher z-index values will appear stacked on top of elements with lower z-index values rendered on the same area of the page. 10
CSS Properties Used with Page Layout & Formatting See Table 6.1 in your text for an alphabetical listing. Also see Appendix C 11
Checkpoint 6.1 1. State three reasons to use CSS for page layout on a commercial site being developed today. 2. Describe the difference between relative and absolute positioning. 3. Describe the purpose of the z-index CSS property. 12
CSS Page Layout Example Except for imagelogo, all elements on this page follow normal flow
Two Column Page Layout wrapper contains the two columns – sets default background color Left-column navigation float: left; width:100px; Right-column content margin-left: 100px; floatright (flower photo) float: right; 14
body {margin: 0;      font-family: Verdana, Arial, sans-serif;  } #wrapper { background-color :#e8b9e8;      color: #000066;      width: 100%;      min-width :800px; }  #leftcolumn { float: left;      width: 100px; }  #rightcolumn { margin-left :100px;       background-color :#ffffff;       color :#000000; }  #logo { background-color :#eeeeee;       color: #cc66cc;        font-size :x-large;       border-bottom: 1px solid #000000;       padding: 10px; } .content {padding :20px 20px 0 20px;  }  #floatright {margin :10px;       float: right; } #footer {font-size: xx-small;        text-align: center; 	 clear: right;        padding-bottom: 20px; }	 div#leftcolumn a { text-decoration :none; 	 margin: 15px; display :block; }  Two Column Page Layout 15

More Related Content

What's hot

How to catch query string in angular js
How to catch query string in angular jsHow to catch query string in angular js
How to catch query string in angular jscodeandyou forums
 
Frontend meetup 2013 08-06
Frontend meetup 2013 08-06Frontend meetup 2013 08-06
Frontend meetup 2013 08-06Robert Szaloki
 
How I learned to Stop Worrying and Love the inline-block
How I learned to Stop Worrying and Love the inline-blockHow I learned to Stop Worrying and Love the inline-block
How I learned to Stop Worrying and Love the inline-blockEU Edge
 
User Interface Development with Mulberry
User Interface Development with MulberryUser Interface Development with Mulberry
User Interface Development with Mulberrymrdanimal
 

What's hot (6)

How to catch query string in angular js
How to catch query string in angular jsHow to catch query string in angular js
How to catch query string in angular js
 
Pp checker
Pp checkerPp checker
Pp checker
 
Frontend meetup 2013 08-06
Frontend meetup 2013 08-06Frontend meetup 2013 08-06
Frontend meetup 2013 08-06
 
How I learned to Stop Worrying and Love the inline-block
How I learned to Stop Worrying and Love the inline-blockHow I learned to Stop Worrying and Love the inline-block
How I learned to Stop Worrying and Love the inline-block
 
User Interface Development with Mulberry
User Interface Development with MulberryUser Interface Development with Mulberry
User Interface Development with Mulberry
 
Document
DocumentDocument
Document
 

Similar to CSS Page Layout Techniques Guide

CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)Rafi Haidari
 
Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Davide Di Pumpo
 
Css code for a awoko newspaper html website which provides busines.pdf
Css code for a awoko newspaper html website which provides busines.pdfCss code for a awoko newspaper html website which provides busines.pdf
Css code for a awoko newspaper html website which provides busines.pdfaroraenterprisesmbd
 
Stylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartStylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartScott DeLoach
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4Gheyath M. Othman
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel Andrew
 
Responsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da WebResponsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da WebEduardo Shiota Yasuda
 
CSS Position and it’s values
CSS Position and it’s valuesCSS Position and it’s values
CSS Position and it’s valuesGunjan Tulsiani
 
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]Rizki Ogawa
 
Attsf css kt
Attsf css ktAttsf css kt
Attsf css ktturp31
 
In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... British Council
 

Similar to CSS Page Layout Techniques Guide (20)

Css tips & tricks
Css tips & tricksCss tips & tricks
Css tips & tricks
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Web Layout
Web LayoutWeb Layout
Web Layout
 
CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)
 
Lecture-8.pptx
Lecture-8.pptxLecture-8.pptx
Lecture-8.pptx
 
Css advanced – session 4
Css advanced – session 4Css advanced – session 4
Css advanced – session 4
 
Chapter6
Chapter6Chapter6
Chapter6
 
Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016
 
Css 101
Css 101Css 101
Css 101
 
A More Perfect Union with CSS
A More Perfect Union with CSSA More Perfect Union with CSS
A More Perfect Union with CSS
 
Css code for a awoko newspaper html website which provides busines.pdf
Css code for a awoko newspaper html website which provides busines.pdfCss code for a awoko newspaper html website which provides busines.pdf
Css code for a awoko newspaper html website which provides busines.pdf
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Stylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartStylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStart
 
Web Design Course: CSS lecture 4
Web Design Course: CSS  lecture 4Web Design Course: CSS  lecture 4
Web Design Course: CSS lecture 4
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
Responsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da WebResponsive Web Design e a Ubiquidade da Web
Responsive Web Design e a Ubiquidade da Web
 
CSS Position and it’s values
CSS Position and it’s valuesCSS Position and it’s values
CSS Position and it’s values
 
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
 
Attsf css kt
Attsf css ktAttsf css kt
Attsf css kt
 
In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how...
 

More from Jiyeon Lee (20)

Cultural conflict resolution
Cultural conflict resolutionCultural conflict resolution
Cultural conflict resolution
 
Class22
Class22Class22
Class22
 
Class 21
Class 21Class 21
Class 21
 
Class 21
Class 21Class 21
Class 21
 
Class 20
Class 20Class 20
Class 20
 
Class19
Class19Class19
Class19
 
Class18
Class18Class18
Class18
 
Class 17
Class 17Class 17
Class 17
 
Class14
Class14Class14
Class14
 
Class15
Class15Class15
Class15
 
Class 12
Class 12Class 12
Class 12
 
Class13
Class13Class13
Class13
 
Class11
Class11Class11
Class11
 
Class8
Class8Class8
Class8
 
Class7
Class7Class7
Class7
 
Class6
Class6Class6
Class6
 
Class5
Class5Class5
Class5
 
Class4
Class4Class4
Class4
 
Class 3
Class 3Class 3
Class 3
 
Class2
Class2Class2
Class2
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
"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
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
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
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic 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
 
"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
 

CSS Page Layout Techniques Guide

  • 2. Normal Flow Browser display of elements in the order they are coded in the Web page document Figure 6.6 Figure 6.5
  • 3. Relative Positioning Changes the location of an element in relation to where it would otherwise appear 3 h1 { background-color:#cccccc; padding:5px; color: #000000; } #myContent { position: relative; left:30px; font-family:Arial,sans-serif; }
  • 4. Absolute Positioning Precisely specifies the location of an element in the browser window 4 h1 { background-color:#cccccc; padding:5px; color: #000000; } #content {position: absolute; left:200; top:100; font-family:Arial,sans-serif; width:300; }
  • 6. float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using the float property. 6 h1 { background-color:#cccccc; padding:5px; color: #000000; } p { font-family:Arial,sans-serif; } #yls {float:right; margin: 0 0 5px 5px; border: solid; }
  • 7. clear Property The h2 text is displayed in normal flow. Useful to “clear” or terminate a float Values are left, right, and both clear: left; was applied to the h2. Now the h2 text displays AFTER the floated image.
  • 8. overflow Property The background does not extend as far as you’d expect. Intended to configure the display of elements on a Web page. However, it is useful to “clear” or terminate a float before the end of a container element Values are auto, hidden, and scroll overflow: auto; was applied to the div that contains the image and paragraph. Now the background extends and the h2 text displays AFTER the floated image.
  • 9. Display Property Configures how and if an element is displayed display:none ; The element will not be displayed. display:block ; The element is rendered as a block element – even if it is actually an inline element,such as a hyperlink. display:inline; The element will be rendered as an inline element – even if it is actually a block element – such as a <li>. You’ll work with the display property in Hands-On Practice 6.6 and in Chapter 7. 9
  • 10. Z-Index Property Modifies the stacking order of elements on a Web page. default z-index value is “0” Elements with higher z-index values will appear stacked on top of elements with lower z-index values rendered on the same area of the page. 10
  • 11. CSS Properties Used with Page Layout & Formatting See Table 6.1 in your text for an alphabetical listing. Also see Appendix C 11
  • 12. Checkpoint 6.1 1. State three reasons to use CSS for page layout on a commercial site being developed today. 2. Describe the difference between relative and absolute positioning. 3. Describe the purpose of the z-index CSS property. 12
  • 13. CSS Page Layout Example Except for imagelogo, all elements on this page follow normal flow
  • 14. Two Column Page Layout wrapper contains the two columns – sets default background color Left-column navigation float: left; width:100px; Right-column content margin-left: 100px; floatright (flower photo) float: right; 14
  • 15. body {margin: 0; font-family: Verdana, Arial, sans-serif; } #wrapper { background-color :#e8b9e8; color: #000066; width: 100%; min-width :800px; } #leftcolumn { float: left; width: 100px; } #rightcolumn { margin-left :100px; background-color :#ffffff; color :#000000; } #logo { background-color :#eeeeee; color: #cc66cc; font-size :x-large; border-bottom: 1px solid #000000; padding: 10px; } .content {padding :20px 20px 0 20px; } #floatright {margin :10px; float: right; } #footer {font-size: xx-small; text-align: center; clear: right; padding-bottom: 20px; } div#leftcolumn a { text-decoration :none; margin: 15px; display :block; } Two Column Page Layout 15