ITI 133 HTML5 Desktop and Mobile Level I

Slides:



Advertisements
Similar presentations
CSS Internet Engineering Spring 2014 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology.
Advertisements

Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
Session 4: CSS Positioning Fall 2006 LIS Web Team.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Diliev.com & pLOVEdiv.com  DIliev.com.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
Tutorial 4: Creating page layout with css
ITI 133: HTML5 Desktop and Mobile Level I
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
CSS Netcentric. What is CSS O CSS stands for Cascading Style Sheets O Styles define how to display HTML elements O Styles were added to HTML 4.0 to solve.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Week 5.  Normal document flow  Affecting document flow with float and position properties using CSS  Using these properties to create layouts.
Cascading Styles Sheets Positioning HTML elements.
Laying out Elements with CSS
CSS Layouts: Positioning and Navbars
CSS Layouts: Grouping Elements
HTML5 Level II Session V Chapter 8 - How to Use Responsive Web Design (RWD)
Webpage layout using CSS
Creating Page Layouts with CSS
Cascading Style Sheets (Layout)
CS3220 Web and Internet Programming Page Layout with CSS
CS3220 Web and Internet Programming Page Layout with CSS
HTML5 Level II Session II
HTML5 Level I Session II Chapter 2 - How to Code, Test and Validate a Web Page
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
Cascading Style Sheets
ITI 133 HTML5 Desktop and Mobile Level I
Session I Chapter 10 - How to Work with Tables
HTML5 Level I Session III
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
6 Layout.
Styles and the Box Model
HTML5 Level I Session II Chapter 3 - How to Use HTML to Structure a Web Page
HTML5 Session III Chapter 5 - How to Use the CSS Box Model for Spacing, Borders, and Backgrounds Chapter 6 - How to use CSS for page.
MORE Cascading Style Sheets (The Positioning Model)
HTML5 Level I Session III
HTML5 Level I Session III
Cascading Style Sheets
Session VI Chapter 8 - How to Use Responsive Web Design (RWD)
HTML Level II (CyberAdvantage)
Chapter 8 - How to Use Responsive Web Design (RWD)
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
How to use CSS for page layout Murach's HTML and CSS, 4th Edition
How to use the CSS box model for spacing, borders, and backgrounds
Responsive Web Design (RWD)
ITI 133: HTML5 Desktop and Mobile Level I
Floating and Positioning
CS3220 Web and Internet Programming Page Layout with CSS
ITI 134: HTML5 Desktop and Mobile Level II
Web Development & Design Foundations with HTML5
Principles of Web Design 5th Edition
Laying out Elements with CSS
CSc 337 Lecture 5: Grid layout.
Session IV Chapter 15 - How Work with Fonts and Printing
ITI 133: HTML5 Desktop and Mobile Level I
Positioning Boxes Using CSS
Presentation transcript:

ITI 133 HTML5 Desktop and Mobile Level I Session III Chapter 6 - How to Use the CSS for Page Layout www.profburnett.com 8/1/2014 Copyright © Carl M. Burnett

Class Outline HTML5 How to Use CSS to Create Multiple Columns 2-Column Web Page with Fixed-Width Columns 2-Column Web Page with Liquid Widths 3-Column Web Page with Fixed-Width Columns How to Use CSS to Create Multiple Columns How to Use Position Elements Student Exercise 2 8/1/2014 Copyright © Carl M. Burnett

HTML5 for a 2 Column Layout <body> <header><h1>Header</h1></header> <section><h1>Section</h1></section> <aside><h1>Aside</h1></aside> <footer><h1>Footer</h1></footer> </body> 8/1/2014 Copyright © Carl M. Burnett

A 2-Column Web Page with Fixed-Width Columns Header Section Aside Footer 8/1/2014 Copyright © Carl M. Burnett

CSS For 2-column web page with fixed-width columns * { margin: 0; padding: 0; } body { width: 962px; background-color: white; margin: 15px auto; border: 1px solid black; } h1 { padding: 10px; } header { border-bottom: 2px solid #ef9c00; } section { height: 400px; width: 600px; float: left; border-right: 2px solid #ef9c00; float: left; } aside { width: 360px; float: right; } footer { clear: both; border-top: 2px solid #ef9c00; } 8/1/2014 Copyright © Carl M. Burnett

A 2-Column Web Page with Liquid Widths Header Section Aside Footer 8/1/2014 Copyright © Carl M. Burnett

CSS For 2-Column Web Page with Liquid Widths body { width: 90%; background-color: white; margin: 15px auto; border: 1px solid black; } section { width: 66%; height: 400px; border-right: 2px solid #ef9c00; float: left; } aside { width: 33%; float: right; } 9/21/2018 Copyright © Carl M. Burnett

CSS for 2-Column Web Page with Fixed and Liquid Widths body { width: 90%; background-color: white; margin: 15px auto; border: 1px solid black; } section { float: left; } aside { height: 400px; width: 360px; border-left: 2px solid #ef9c00; float: right; } 9/21/2018 Copyright © Carl M. Burnett

HTML For 3-Column Web Page with Fixed-Width Columns <body> <header><h1>Header</h1></header> <aside id="sidebarA"><h1>Sidebar A</h1></aside> <section><h1>Section</h1></section> <aside id="sidebarB"><h1>Sidebar B</h1></aside> <footer><h1>Footer</h1></footer> </body> 9/21/2018 Copyright © Carl M. Burnett

A 3-Column Web Page with Fixed-Width Columns Header Sidebar A Section Sidebar B Footer 9/21/2018 Copyright © Carl M. Burnett

CSS for 3-Column Web Page with Fixed-Width Columns body { width: 964px; background-color: white; margin: 15px auto; border: 1px solid black; } #sidebarA { width: 180px; height: 400px; float: left; border-right: 2px solid #ef9c00; } section { width: 600px; float: left; } #sidebarB { float: right; border-left: 2px solid #ef9c00; } 9/21/2018 Copyright © Carl M. Burnett

How to Use CSS3 to Create Multiple Columns Browser Support CSS3 Properties for Creating Multiple Columns column-count column-gap column-rule column-span 8/1/2014 Copyright © Carl M. Burnett

How to Use CSS3 to Create Multiple Columns article { -moz-column-count: 3; -webkit-column-count: 3; column-count: 3; } 9/21/2018 Copyright © Carl M. Burnett

How to Use CSS3 to Create Multiple Columns article { -moz-column-count: 3; -webkit-column-count: 3; column-count: 3; -moz-column-gap: 25px; -webkit-column-gap: 25px; column-count-gap: 25px; -moz-column-rule: 2px solid black; -webkit-column-rule: 2px solid black; column-rule: 2px solid black; } Example 9/21/2018 Copyright © Carl M. Burnett

How to Use Position Elements Property for Positional Elements Property Description position Keyword (See table below) top, bottom, left, right Absolute or Fixed z-index Integer ( Set to absolute relative or fixed) Possible Values for Position Property Property Description static Placed in normal flow (Default) absolute Removed from flow. Positioned relative to closest block fixed Positioned absolute to browser window relative Positioned relative to the normal flow 8/1/2014 Copyright © Carl M. Burnett

HTML for Web Page with Absolute Positioning <body> <section> <h1>Our speakers for 2011-2012</h1> <ul> <li>October 19, 2011: <a href="speakers/toobin.html"> Jeffrey Toobin</a></li> <li>November 16, 2011: <a href="speakers/sorkin.html"> Andrew Ross Sorkin</a></li> <li>January 18, 2012: <a href="speakers/chua.html"> Amy Chua</a></li> </ul> <p>Please contact us for tickets.</p> </section> <aside> <p><a href="raffle.html">Enter to win a free ticket!</a></p> </aside> </body> 9/21/2018 Copyright © Carl M. Burnett

CSS for Web Page with Absolute Positioning p { margin: 0;} body { width: 500px; margin: 0 25px 20px; border: 1px solid black; position: relative; } aside { width: 80px; padding: 1em; position: absolute; right: 30px; top: 50px; } Example 9/21/2018 Copyright © Carl M. Burnett

HTML for the Positioned Elements <section> <h1><i>Murach’s JavaScript and DOM Scripting</i></h1> <h2>Section 1<span class="title">Introduction to JavaScript programming</span></h2> <h3>Chapter 1<span class="title">Introduction to web development and JavaScript</span><span class="number">3</span></h3> <h3>Chapter 2<span class="title">How to code a JavaScript application</span> <span class="number">43</span></h3> ... <h2>Section 2<span class="title">JavaScript essentials</span></h2> <h3>Chapter 6<span class="title">How to get input and display output</span> <span class="number">223</span></h3> </section> 9/21/2018 Copyright © Carl M. Burnett

CSS for the Positioned Elements section h2 { margin: .6em 0 0; position: relative; } section h3 { font-weight: normal; margin: .3em 0 0; .title { position: absolute; left: 90px; } .number { right: 0; } Example 9/21/2018 Copyright © Carl M. Burnett

HTML for Overlapping Elements <!DOCTYPE html> <html> <head> <style> img { position:absolute; left:0px; top:0px; z-index:-1; } </style> </head> <body> <h1>This is a heading</h1> <img src=“mcc.gif" width="100" height="140" /> <p>Because the image has a z-index of -1, it will be placed behind the text.</p> </body> </html> 8/1/2014 Copyright © Carl M. Burnett

CSS For Overlapping Elements img { position:absolute; left:0px; top:0px; z-index:-1; } Example 8/1/2014 Copyright © Carl M. Burnett

Student Exercise 2 Complete Exercise 6-1, 6-2 and 6-3 on page 233 using Dreamweaver. The c6_content.txt and c6_sampson.txt files listed in Exercises 6-2 and 6-3 are located in the txt folder on your developmental site. Upload your HTML pages and CSS files to the live site to preview. 8/1/2014 Copyright © Carl M. Burnett

Chapter 7 - How to Work with Links and Lists Class Review HTML5 2-Column Web Page with Fixed-Width Columns 2-Column Web Page with Liquid Widths 3-Column Web Page with Fixed-Width Columns How to Use CSS to Create Multiple Columns How to Use Position Elements Next – Session IV Chapter 7 - How to Work with Links and Lists 8/1/2014 Copyright © Carl M. Burnett