Page Layout with CSS Learning Web Design: Chapter 16.

Slides:



Advertisements
Similar presentations
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Cascading Style Sheets
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Multimedia and the World Wide Web HCI 201 Lecture Notes #5A.
Dreamweaver Domain 3 KellerAdobe CS5 ACA Certification Prep Dreamweaver Domain 2 KellerAdobe CS5 ACA Certification Prep Dreamweaver Domain 2: Planning.
Tutorial 6 Creating Fixed-Width Layouts
1 10. Page Layout with CSS Multi-Column Layouts. 2 In this section, we will investigate how CSS-based Web design provides some simple templates that will.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
 CSS Presentation and layout is based on the CSS Box Model.  The CSS Box Model states that every element on a page is a rectangular box.  This includes:
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
XP 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Using HTML Tables.
The Power of Tables They aren't just for sitting stuff on anymore...
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
Organizing Content by Using Dreamweaver CS5 Domain 5.
Web Design, 3 rd Edition 4 Planning a Successful Web Site: Part 2.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Layouts with CSS Web Design – Section 4-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
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.
Principles of Web Design 6 th Edition Chapter 7 – Page Layouts.
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® Copyright 2012 Adobe.
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
CSS = Cascading Style Sheet CSS consists of rules to display, style and decorate HTML elements Why CSS ? – Separate decoration from HTML markup (Ex :,,…)
WEB DESIGN AND PROGRAMMING Advanced CSS Techniques.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
More CSS.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
CSS BEST PRACTICES.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CSS Positioning & Layout Creating layouts and controlling elements.
Page Layout CHAPTER 5 1 CHARLES WYKE-SMITH: STYLIN’ WITH CSS: A DESIGNER’S GUIDE (3 ND EDITION)
Positioning Objects with CSS and Tables
Today’s objectives  Announcements  Positioning  Measurement units.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
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
Cascading Style Sheets Layout
Create and edit web pages 4
Concepts for fluid layout
Tables and Frames.
Advanced CSS BIS1523 – Lecture 20.
Creating a Baseline Grid
CSS BEST PRACTICES.
Unit 4: Using Spreadsheets to Make Economic Choices Lessons 20–26
Controlling Layout with Style Sheets
Cascading Style Sheets™ (CSS)
Floating and Positioning
Concepts for fluid layout
Presentation transcript:

Page Layout with CSS Learning Web Design: Chapter 16

Lesson Overview The three types of page layouts will be presented: fixed, liquid and elastic Two and three column layouts templates with floats will be discussed Two and three column layouts using absolute positioning will be covered Finally, we will present a technique for centering a fixed-width page

Page Layout Strategies While these things are uncertain… The precise size of the user’s window The size of text set by the user There are three general approaches to page layouts that are used : Fixed Liquid Elastic Fixed LiquidElastic

Liquid Page Design Liquid layouts are the default behavior of the normal flow If you do nothing else, the page will adjust to the size of the user’s window The page area or columns within a page get wider and narrower to fill space in browser window Width of content is not controlled Do not use to force new lines

Creating a Liquid Design To specify a liquid layout, widths of columns or page are given in percentages There is 100% of the window available You can also specify no width and the default will be auto so the element will be the total width possible

Liquid Layout Pros and Cons Pros: You don’t have to design for the monitor resolution Can avoid empty space because text fills the window Liquid pages keep with the spirit of the Internet Cons: On large monitors, line lengths can become difficult to read Liquid layouts are less predictable Elements may be too spread out or too cramped at extreme browser dimensions

Optimal Line Length??? The line length is measured in the number of words or characters in a line of text The “rule of thumb” is that the optimal line length is 10 to 12 words or between 60 and 75 characters When a line grows too long, it becomes difficult to read Line length is at the heart of most debate over which layout type is the best

Example Liquid Layout Each of the three columns is given a percentage of the window’s width Left column width=“20%” Center column width=“50%” Right column width=“25% Remaining % given to margins

2 Column Hybrid Liquid Layout The left column is a fixed width The right column width is set to auto As the window resizes, the right column adjusts to fill the remaining space

3 Column Hybrid Liquid Layout Both the left and right columns are a fixed width The center column width is set to auto As the window resizes, the center column adjusts to fill the remaining space

Fixed-Width Layouts Fixed-width layouts keep a specified pixel width as given by the designer The width will stay fixed no matter what size the containing element or window takes Graphic designers used to creating content for print media prefer fixed-width layouts because they can exactly control the look of the finished page

Creating a Fixed-Width Design Need to pick a page width based on a common monitor resolution More sites are using the pixel width for 1024 screens The entire page content is placed in a wrapper usually named container or wrapper This container is given a pixel width corresponding to the fixed-width of the page Margins and padding are also given in pixels

Fixed-Width Pros and Cons Pros Line width is controlled for a more readable content area Fixed width layouts are sometimes easier to style depending on the effect you are after Some visual designs can only be achieved in a reasonable manner with a fixed width layout. Cons People with low resolution monitors may end up with a horizontal scroll bar A small width site can look too narrow on large screen displays The narrow width can limit the number of columns Line lengths may appear too short at very large text sizes

Example Fixed Width Layout This fixed-width site is left justified (default) A container is used to provide the fixed-width in pixels The container wraps both the left and right columns

Elastic Layout With an elastic layout, the main wrapper and other elements are measured using em as the unit of measure Ems are relative proportionally to the text or font size As the text size is increased, the sections measured in ems will increase in size as well Elastic designs can make a site more usable and accessible

Creating an Elastic Layout The key to an elastic layout is the em unit of measure which is based on the text size. Using em allows text to be resized with the zoom feature in all modern browsers Widths of other elements on the page including columns also given in em measurement will also resize as well

How Wide is an Em??? It may be difficult to understand the width of an em This site provides an em measurement tool so you can increase or decrease the em percentage and see how the ems adjust page width and element widths Click to increase % Click to decrease %

Elastic Layout Pros and Cons Pros This is a very stable layout method because everything resizes proportionately The end result is all page textual content including columns size is proportional to the text Accessibility can be increased using relative sized fonts Cons Images don’t lend themselves to rescaling Unless limited, this layout method can be a usability disaster as it’ll get wider and wider and wider — without benefit

Example Elastic Layout All text and elements with width properties use the em unit of measure As the text grows so does the content area Line breaks remain the same beast.com/portfolio/zen/css/zen.css

Zoom Layouts for Low-Vision Zoom layouts provide an accessible alternative to low-vision users Use a single column Extremely large type using ems for scalability High-contrast text and background Simplified navigation at the top of page

Hand Held Layout Advice Retain a single-column layout Don’t specify font, size, or color Consider hiding or at least moving all your navigation to the bottom of the page Don’t do anything special to images They are a known issue in browser software and you should let these user agents handle images themselves

Zoom vs. Handheld Needs ConventionalZoomHandheld No single audience is assumed Low-vision audience (no personal choice) Handheld owner (personal choice) Single - or multicolumn layout Single – column layout Single – column layout layout No limits on navigationSimple navigation preferred Navigation eliminated, rewritten by proxy server, or deferred to page end Any type colorLight-on-dark preferred Browser defaults (usually dark-on-light) preferred Any type sizeLarge neededBrowser defaults preferred

Which Layout is Best? As you have seen, each layout has its advantages and drawbacks Most developers rely on their most used favorites The “best” choice to lay out a page should consider: the target audience needs the organization needs and the nature of the content

Page Layout Templates The most popular layouts are two and three column layouts Our textbook provides templates for the following layouts: Multicolumn layouts using floats Multicolumn layouts using absolute positioning A centered, floated fixed-width layout ( we will use this in Project 7 & Project 8)

Tips for Using Textbook Code The markup has been omitted to save space Should include tag for style sheet Header and footer included in examples but either could be omitted Background colors and borders can be used during design time to help verify where boxes are located While templates are provide a framework, they can be modified as needed

Creating Layouts in CSS Use an external CSS file, all formatting for the page layout should be placed in the.css file This way, the Web page would just contain the content of the page, and no layout formatting or styling The external style sheet is linked to the Web page. This allows the designer to separate presentation from content

Centering Fixed-Width Layouts Many designers choose to center a fixed- width layout on the page The following style rules should be added to the container/wrapper id style rule position: relative; default if floating columns width: 950px; give the fixed-width margin-left: auto; auto adjust left margin margin-right: auto; auto adjust right margin

Two-Column Background Problem When using two-columns in a layout, often one column is longer because it may have more content If each column has its own background color, the user will see two columns with different heights How can you make both a left and right column have the same height of background?

Solution: Provide a background image for a container that includes both columns The image is a horizontal slice that has two different colored areas or patterns The image will be tiled in the Y direction according to the longest column The total width of the background image should be equal to the container fixed-width Repeat in Y direction

Tiled Two-Column Background Notice both left and right column backgrounds have the same height Repeat in Y direction

CSS Layout Summary The three types of page layouts types were presented: fixed, liquid and elastic Which ever you choose, you should use an external style sheet to set layout style rules Two –column, fixed-width layout with floats will be the layout we will use for Project 7 and Project 8 While a fixed-width container defaults to left justification, it can be centered if wanted