Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification properties.
Advertisements

CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
CGS 3175: Internet Applications (CSS – Page Layout) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 Cascading Style Sheets – Page Layout.
CSS provides a way to stray away from the traditional methods of using tables to lay out pages. Success with this technique depends on understanding of.
CSS, cont. October 12, Unit 4. Creating a Sidebar We know how to create a sidebar –Use the float property div#sidebar{ float: left; } Item1 Item2 Item3.
Cascading Style Sheets Part 3 Fall, 2007 Modified by Linda Kenney Nov. 12, 2007.
1 CSS more details Reasons to use CSS for page layoutReasons to use CSS for page layout Relative and absolute positioningRelative and absolute positioning.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
MORE Cascading Style Sheets (The Positioning Model)
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Technologies for web publishing Ing. Václav Freylich Lecture 7.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris CSS Flow & Positioning 1 Copyright © Terry Felke-Morris.
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.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
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.
Web Development & Design Foundations with HTML5 7th Edition
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Cascading Style Sheets (CSS) Part II IT210: Web-based IT.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Cascading Styles Sheets Positioning HTML elements.
CHAPTER 15 Floating and Positioning. FLOAT VS. POSITION  Floating an element moves it to the left or right, allowing the following text to wrap around.
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
Laying out Elements with CSS
Working with Cascading Style Sheets
Cascading Style Sheets Layout
Web Development & Design Foundations with XHTML
CSS Layouts: Grouping Elements
Webpage layout using CSS
Floating & Positioning
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
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Creating Layouts Using CSS
CSS Borders and Margins.
Positioning.
MORE Cascading Style Sheets (The Positioning Model)
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.
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
Floating and Positioning
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with HTML5
Positioning.
Laying out Elements with CSS
Presentation transcript:

Web Development & Design Foundations with XHTML Chapter 6 Key Concepts

CSS Page Layout Overview W3C Recommendations for CSS level 2 published in 1998 It took years for reliable browser support of CSS Present Day: ◦ It is common practice to design web page layouts with CSS Examples:     2

CSS Page Layout Advantages Greater typography control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control Increased accessibility Ability to define styles for multiple media types Support of the Semantic Web 3

CSS Page Layout Disadvantages There still remain issues with the lack of uniform browser support of CSS If you are already adept at designing page layout using XHTML tables, your productivity will temporarily drop as you learn to configure page layout with CSS. 4

The Box Model Content ◦ Text & web page elements in the container Padding ◦ Area between the content and the border Border ◦ Between the padding and the margin Margin ◦ Determines the empty space between the element and adjacent elements 5

Normal Flow Browser display of elements in the order they are coded in the Web page document Figure 6.5 Figure 6.6

Hands-On Practice 6.1 Page 219 Chapter6/box1.html Chapter6/box2.html

Relative Positioning Changes the location of an element in relation to where it would otherwise appear 8 h1 { background-color:#cccccc; padding:5px; color: #000000; } #myContent { position: relative; left:30px; font-family:Arial,sans-serif; } 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 9 h1 { background-color:#cccccc; padding:5px; color: #000000; } #content {position: absolute; left:200; top:100; font-family:Arial,sans-serif; width:300; } 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

Hands-On Practice 6.2 Pages Chapter6/starter2.html Chapter6/trillium.html

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. 12 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 Useful to “clear” or terminate a float Values are left, right, and both The h2 text is displayed in normal flow. clear: left; was applied to the h2. Now the h2 text displays AFTER the floated image.

overflow Property 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 The background does not extend as far as you’d expect. 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. ◦ You’ll work with the display property in Hands-On Practice 6.6 and in Chapter 7. 15

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. 16

CSS Properties Used with Page Layout & Formatting See Table 6.1 in your text for an alphabetical listing. Also see Appendix C 17

Hands-On Practice 6.4 Page Chapter6/wildflowers Chapter6/splash.html Chapter6/wildflower.css

FAQ Page 236 How do I know exactly what values to use for absolute positioning?