Tutorial 6 Creating Fixed-Width Layouts

Slides:



Advertisements
Similar presentations
Working with Web Tables
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.
Cascading Style Sheets
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 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Tutorial 5 Working with the Box Model. XP Objectives Understand the box model Create padding, margins, and borders Wrap text around an image Float a block-level.
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
Using CSS for Page Layout. Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 4 Creating Special Effects with CSS
MORE Cascading Style Sheets (The Positioning Model)
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Tutorial 6 Creating Tables and CSS Layouts. Objectives Session 6.1 – Create a data table to display and organize data – Modify table properties and layout.
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.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
ITP 104.  While you can do things like this:  Better to use styles instead:
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
Cascading Style Sheets CSS. CSS Positioning Normal Flow Top -> bottom | left -> right Arranged in the order they appear in the code make room for one.
Cascading Style Sheets CSS. div … Used like a container to group content Gives context to the elements in the grouping Give it a descriptive name with.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
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.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
Positioning and Printing Creating Special Effects with CSS.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
Positioning Objects with CSS and Tables
- WE’LL LOOK AT THE POSITION PROPERTY AND HOW CSS RESOLVES CONFLICTS BETWEEN STYLING INSTRUCTIONS The position property; CSS specificity hierarchy.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
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.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
Laying out Elements with CSS
Working with Cascading Style Sheets
Cascading Style Sheets Layout
CSS Layouts: Grouping Elements
Creating Page Layouts with CSS
Positioning Objects with CSS and Tables
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 8th Edition
Objectives Create a reset style sheet Explore page layout designs
6 Layout.
MORE Cascading Style Sheets (The Positioning Model)
Web Development & Design Foundations with H T M L 5
SEEM4570 Tutorial 3: CSS + CSS3.0
Tutorial 4 Creating Special Effects with CSS
Laying out Elements with CSS
Positioning Objects with CSS and Tables
Positioning Boxes Using CSS
Presentation transcript:

Tutorial 6 Creating Fixed-Width Layouts

Objectives Create a two-column layout Use id selectors to create styles Create page structure with the div element Determine fixed column widths using pixels New Perspectives on Blended HTML, XHTML, and CSS

Objectives Understand document flow Center an image Determine how specificity resolves conflicts Create a faux column effect New Perspectives on Blended HTML, XHTML, and CSS

Understanding Web Page Layouts There is no standard method for creating Web page layouts Layouts take planning Broken layouts do not appear on the screen as planned Column drop occurs when there isn’t enough horizontal space to display all of the columns in your layout Fixed-width layouts Fluid layouts Consider items that might reduce the viewing area Widget sidebars New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Two-Column Fixed Layout Horizontal header row Horizontal navbar Sidebar Main content area Footer New Perspectives on Blended HTML, XHTML, and CSS, 2e

Understanding Web Page Layouts The div element defines a division in an XHTML document The universal selector is used to select all of the elements on the Web page New Perspectives on Blended HTML, XHTML, and CSS, 2e

Understanding Web Page Layouts Creating the container div serves as a large box that contains other boxes New Perspectives on Blended HTML, XHTML, and CSS, 2e

Understanding Web Page Layouts To create boxes with rounded corners, use design software to create four or more images for the corner effects New Perspectives on Blended HTML, XHTML, and CSS, 2e

Determining the Content Width To determine the value for the width property of a div element to be used for column content: If a div such as a header or footer div spans the entire row, subtract the sum of the left and right margins, the border, and the padding values from the width of its parent container to determine the content width. For side-by-side columns, choose an appropriate content width for each column. Columns of secondary importance, such as sidebar and section columns, should be narrow. The column of primary importance, such as the main column, should be the widest. New Perspectives on Blended HTML, XHTML, and CSS, 2e

Determining the Content Width New Perspectives on Blended HTML, XHTML, and CSS, 2e

Determining the Content Width Next, create styles for the navbar, sidebar, main column, and footer New Perspectives on Blended HTML, XHTML, and CSS, 2e

Determining the Content Width New Perspectives on Blended HTML, XHTML, and CSS, 2e

Using the Positioning Properties The document flow describes how the contents of the page are recognized by the browser Absolute positioning Relative positioning The left property positions an element a certain distance from the left edge of the screen The top property positions an element a certain distance from the top edge of the screen The z-index property stacks elements on top of each other New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout The source order is the order of the content in the document flow Browser normally reads from top to bottom and left to right Floated divs must appear before nonfloated divs You may need to modify the source order Create styles for the header, sidebar column, and main column Flanking columns are columns that appear to the left or the right of the main column New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout The layout plan for the main column: New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout Create styles for the Section id selector New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout Centering an Image: To center an image, use the declaration: img.classname { display: block; margin: auto; } where img is the image element and classname is the name of the class. Apply the class to the image to be centered. To center all images, use the same declarations for the image element selector. New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating a Three-Column Layout Creating Styles for the Footer Div: New Perspectives on Blended HTML, XHTML, and CSS, 2e

Using @import The @import rule allows users to import style rules from other style sheets Must come after CSS comments and before any of the styles code in the style sheet New Perspectives on Blended HTML, XHTML, and CSS, 2e

Understanding Specificity Specificity determines priorities and uses a weighting method to calculate which style rule will prevail if there are conflicting rules in the same source Generally, the style farthest down in the list will prevail The W3C has a weighting methodology for calculating the specificity of particular selectors Weighting values will help determine which style will prevail New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating Faux Columns The CSS overflow property with a value of “auto” adds a vertical scroll bar as needed Faux columns add a background image to create the illusion that the columns have equal height New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating Faux Columns New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating Faux Columns New Perspectives on Blended HTML, XHTML, and CSS, 2e

Creating Faux Columns New Perspectives on Blended HTML, XHTML, and CSS, 2e