CA 272 - Professional Web Site Development Class 23 - CSS Positioning, Image Replacement & Print Styles.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

J ENWARE Chapters 14 & 15 Learning Web Design, Fourth Edition by Jennifer Niederst Robbins Copyright © 2012.
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
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.
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
SM5312 week 11: CSS Menus & Navigation Bars1 An Introduction to Cascading Style Sheets CSS Menus and Navigation Bars Nick Foxall.
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.
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.
Tutorial 4: Creating page layout with css
Tutorial 6 Creating Fixed-Width Layouts
CA Professional Web Site Development CSS Positioning.
Art 128 Interface Programming 1 In-class Presentation Week 11B.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
CIT 256 Organizing Large Websites: Divs, DW Templates Dr. Beryl Hoffman.
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.
Creating A Simple Web Page. Step 1- Open Dreamweaver & Create A New Page (File New) and blank.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
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.
ITP 104.  While you can do things like this:  Better to use styles instead:
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
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.
Web Technologies Website Development Trade & Industrial Education
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 12 FRAMES. HOW FRAMES WORK When you view a framed page in a browser, you are actually looking at several HTML documents at once. The key to making.
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
 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.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
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.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Web Design Part I. Click Menu Site to create a new site root.
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.
CONTROLLING Page layout
Positioning Objects with CSS and Tables
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 6 1 Creating Dynamic Pages.
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 –
Cascading Style Sheets for layout
Laying out Elements with CSS
CSS Layouts: Grouping Elements
Web Development & Design Foundations with HTML5 8th Edition
Creating Page Layouts with CSS
Cascading Style Sheets for layout
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
Fixed Positioning.
Tutorial 6 Creating Dynamic Pages
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 HTML5
Laying out Elements with CSS
Presentation transcript:

CA Professional Web Site Development Class 23 - CSS Positioning, Image Replacement & Print Styles

CSS Layouts with Floats and Positioning Review: two-column float with clearing footer Wrapper encloses everything Each column is floated Footer clears floats and extends wrapper Column backgrounds are on #wrapper

CSS Layouts with Floats: 3-column layout Divide div#rtCol into two divs: #mainContent and #sidebar Float #mainContent left and #sidebar right Modify background image on #wrapper to include color for third column

CSS Layouts with Absolute Positioning Can replicate layout with AP divs BUT, must know placement of all divs How do you place footer if variable content? How do you create column backgrounds for unknown height?

CSS Layouts with AP - continued Absolute positioning is useful for positioning elements WITHIN layouts E.g., masthead graphics See “liquid layout” (linked on class homepage)

CSS Image Replacement What if we want to replace text with a graphic? (using CSS only) Should leave text in HTML for accessibility and SEO Many techniques; most common (probably) is ‘Phark’ method: text-indent: -5000px; e.g. h1#logo { text-indent: -5000px; background: url(logo.gif) 0 0 no-repeat; width and height as needed } Coca-Cola

CSS Image Replacement Downsides: If images are turned off (but CSS is on) nothing will display Background images usually do not print If you edit text, you’ll need to edit the graphic

Exercise: Image Replacement Download from the class site: Float layout (save to homework folder) Nav button background image (save to images folder) Join button jpeg (save to images folder) Insert a link, “Join Today!”, at the beginning of the second paragraph of simple-page- layout4a.html Give this link class ‘joinButton’

Exercise: Image Replacement (continued) Create CSS styles (for default state and :hover) to make link a button with join.jpg as background image (button should be 100px by 100px) (display; width; height; background; etc.) Float button right and add left and bottom margins Preview in browser Need to hide text of link: text-indent: -5000px; Preview in Firefox - click and hold down button should see dotted box off to left Add outline: none; and preview again

Exercise: Liquid Layout Examine the sample “liquid layout” from the class homepage (ca272.com/exercises/liquid-layout.html) This layout uses floated divs to create two columns of text content as previously demonstrated. However, this layout resizes with the browser window. It also contains a masthead, a ‘marketing message’ area, and horizontal navigation. Draw a wireframe of the layout (divs only), using boxes to show divs. Label the divs with their IDs. Pay close attention to how the divs are nested.

Exercise: Liquid Layout Using your wireframe and viewing the source code and browser display, answer the following questions: resize your browser window – what style declaration is primarily controlling the width of the layout? (Hint: it is not a width property.) why are there two wrapper divs (#wrapper and #wrapper2)? in Firefox, resize your browser window to a very small width and very large width – what style declarations are setting an upper and lower limit on the width of the layout?

Exercise: Liquid Layout open the “liquid layout background image” (used for the column backgrounds) from the class homepage (ca272.com/images/liquid-bg.gif) – scroll all the way to the right to see the whole image note that the dividing line between the columns does not move when the browser window is resized – how is this accomplished? (Hint: the dividing line in the background graphic is at 2100px – 70% of the background image’s width) the slogan, “Sometimes Average Is Good Enough”, uses image replacement – what declaration is hiding the text?

Exercise: Liquid Layout p#slogan is absolutely positioned at right: 13px – why is it better here to use the right offset than the left offset? why is div#masthead set to position: relative? what would happen if this was not set? resize the browser window smaller and note how the image of the woman slides under the graphic text, “I want to do what’s right…” – what CSS property determines the stacking order of these two absolutely positioned images?

Exercise: Liquid Layout the horizontal CSS navigation in this example is similar to the vertical navigation we created earlier (both are lists with anchors as buttons) – what declaration is making the navigation buttons sit horizontally? how are the custom bullets in the “Side Column” created? why is there no separator line to the right of “Nav8” in the footer section? what would happen without clear: both; on div#footer?

Homework Create a full-color mockup of your Web page layouts Create a markup guide Read the class handout on Microformats