CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.

Slides:



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

15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Tutorial 4: Creating page layout with css
Tutorial 6 Creating Fixed-Width Layouts
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:
Week 7 Web Typography. 2 Understanding Type Design Principles.
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
 CSS ids  Pages  Sites  HTML: class=“name”  Names may define format OR content › Either works  CAN apply multiple classes to the same tag  Multiple.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
4.02 Responsive Web Design Concepts Part 1, Part 2 & Part 3 Designing for mobile devices.
4.01 Cascading Style Sheets
4.02 Responsive Web Design Concepts
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Cascading style sheets (CSS)
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.
Using Styles and Style Sheets for Design
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.
1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Page Layout with CSS Learning Web Design: Chapter 16.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Lesson 05 // Web Design, Layout & Structure 1.Web Design/Designer-Coder Relationship 2.Fixed vs Fluid Website Layouts 3.Screen Resolutions.
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
CSS BEST PRACTICES.
DIV, Span, CSS.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
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.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CONTROLLING Page layout
Page Layout CHAPTER 5 1 CHARLES WYKE-SMITH: STYLIN’ WITH CSS: A DESIGNER’S GUIDE (3 ND EDITION)
HTML Frames. Advantages to Using Frames n flexibility in design n information in different Web pages n remove redundancy. n site easier to manage. n update.
Session: 8. © Aptech Ltd. 2Creating Navigational Aids and Division-Based Layout / Session 8  Explain HTML5 semantic tags  Explain HTML5 semantic tag.
Today’s objectives  Announcements  Positioning  Measurement units.
Chapter 4 and 5. Objectives Introduce markup: elements and attributes How browsers interpret HTML documents Basic structure of HTML document What do style.
4.02 Responsive Web Design Concepts Designing for mobile devices.
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.
Cascading Style Sheets for layout
CSS.
Cascading Style Sheets Layout
The Box Model in CSS Web Design – Sec 4-8
CSS Layouts: Grouping Elements
Concepts for fluid layout
Positioning Objects with CSS and Tables
Introduction to Layouts
Cascading Style Sheets for layout
CSS BEST PRACTICES.
Styles and the Box Model
Fixed Positioning.
Introduction to Layouts
Concepts for fluid layout
Positioning Objects with CSS and Tables
Various mobile devices
Presentation transcript:

CONCEPTS FOR FLUID LAYOUT Web Page Layout

Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or newspaper). Multiple columns are created by using (divider) or elements. Cascading Style Sheets are used to position elements, or to create backgrounds or a colorful look for the pages. Even though it is possible to create nice layouts with HTML tables, tables were designed for presenting tabular data - NOT as a layout tool!

Example Layouts with Blocks of Content

Layouts that work on many devices layouts and CSS can create flexible layouts that work on various screen sizes. Responsive web design is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices.

Responsive Web Design Layout changes to fit the device

Common resolutions on various devices

Devices vary in resolution and pixel density As hardware changes, resolution and pixel density change Web layout needs to be flexible and adjust to various mobile devices and new devices A pixel is an abstract unit of measurement and it does not have a single specific size.

More than one type of Pixel Device pixelReference pixelCSS pixelBitmap pixel The smallest physical unit in a display Reference pixels are based on an optical reference unit and developed by the w3c CSS pixel is a unit of measure The smallest unit of data in a raster image.

A Popular Page Layout using

defined The tag defines a division or a section in an HTML document. The tag is used to group block-elements to format them with CSS. The element is very often used together with CSS, to layout a web page

How many elements in this code?

header div Footer div Container div content div 7 div elements

The Power of Web developers use elements to group together HTML elements and apply CSS styles to many elements at once. DIV is a block-level division. Block elements, or block-level elements, have a rectangular structure. By default, these elements will span the entire width of its parent element, and will thus not allow any other element to occupy the same horizontal space as it is placed on.

tag and attributes The tag supports the global attributes in HTML HTML 5 has introduced some new global attributes Global attributes can be used on any HTML element Some examples of global attributes:  id - Specifies a unique id for an element  class - Specifies one or more classnames for an element (refers to a class in a style sheet)  style - Specifies an inline CSS style for an element  lang - Specifies the language of the element's content

Some examples of global attributes id - Specifies a unique id for an element class - Specifies one or more classnames for an element (refers to a class in a style sheet) style - Specifies an inline CSS style for an element lang - Specifies the language of the element's content These are just a few examples. It is not the complete list.

are new in html5 A fairly standard layout consists of a banner near the top, navigation, and your content or display box. These are the backbone to any great website. In HTML5 there is a element, as well as a, that can replace these div tags.

Semantic elements Many of existing web sites today contains HTML code like this:,, or, to indicate navigation links, header, and footer. HTML5 offers new semantic elements to clearly define different parts of a web page; such as

Container elements The tag specifies a header for a document or section. The element should be used as a container for introductory content or set of navigational links. The tag defines a footer for a document or section. A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc. The tag defines a set of navigation links. It is only intended for a major block of navigation links.

CSS for div #main-wrap refers to the div id. The id attribute specifies a unique name

Why use Fixed Layout A fixed website layout has a wrapper that is a fixed width, and the components inside it have either percentage widths or fixed widths. The important thing is that the container (wrapper) element is set to not move. No matter what screen resolution the visitor has, he or she will see the same width as other visitors.

Fixed Layout in Pixels In this example 960 pixels is the fixed width. 20 px space 40 px left and right margins

Fixed Layout in Pixels The container div is 960px The header div is 880px plus 80 pixels of margins. The Content div and sidebar div plus a 20px space equal 880 px 20 px space 40 px left and right margins Header div Content div Sidebar div Footer div

From Fixed to Fluid Compute Percentages and change from pixels to percents 20 px space 40 px left and right margins Content div Sidebar div Footer div Header 92% 73%25%

Fluid Layout Fluid or liquid layouts define dimensions in percentages rather than pixels.  Advantages  Can be more user-friendly, because it adjusts to the user’s set up.  If designed properly, content will distribute evenly  If designed well, a fluid layout can eliminate horizontal scroll bars in smaller screen resolutions.  Disadvantages  Less control over what the user sees  May overlook problems because the layout looks fine on their specific screen resolution.  Images, video and other types of content with set widths may need to be set at multiple widths to accommodate different screen resolutions.  With incredibly large screen resolutions, a lack of content may create excess white space that can diminish aesthetic appeal.

Why consider Fluid Layout In a fluid website layout, also referred to as a liquid layout, the majority of the components have percentage widths, and thus adjust to the user’s screen resolution.

From Fixed Layout to Fluid

Fixed-Width Layout = 960 pixels

Fluid Layout 520/960=54% 200px/960px=20% 20px/960px=2%

Relative Units Relative layouts are accomplished by using a relative unit like the em or the percent ("%") and are preferred since they will better adjust to different media. The em is basically the height of the font being used on the page. It is considered relative because a 16 point font has a different height from, say, a 12 point font: 16 point, 12 point The percent has the normal meaning you are used to from mathematics. That is, if the width of the page is set to 80%, it means 80% of the maximum width it can have. It's regarded as relative since the maximum width varies depending on how big your browser window is. The term “em” is a reference to the Letter “M” in written form.

What is an em unit? “Ems” (em): The “em” is a scalable unit that is used in web document media. An em is equal to the current font- size, for instance, if the font-size of the document is 12pt, 1 em is equal to 12 pt. Ems are scalable, so 2 em would equal 24 pt,.5 em would equal 6 pt, etc. Ems are becoming increasingly popular in web documents due to scalability and their mobile- device-friendly nature.

Factors to consider in Layout Screen resolution and pixel density (screen resolution and pixel density vary by the device) Browser choice Whether or not the browser is maximized Extra toolbars open in the browser (History, Bookmarks, etc.) The operating system and hardware

Resources vs-fluid-vs-elastic-layout-whats-the-right-one-for-you/ vs-fluid-vs-elastic-layout-whats-the-right-one-for-you/ vs-px-vs-pt-vs/ vs-px-vs-pt-vs/