Project 7: Exploring DHTML Essentials for Design JavaScript Level Two Michael Brooks.

Slides:



Advertisements
Similar presentations
Essentials for Design JavaScript Level One Michael Brooks
Advertisements

Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
1 Lesson 10 Using JavaScript with Styles HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Ch. 6 Web Page Design – Absolute Positioning, Image Maps, and Navigation Bars Mr. Ursone.
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Document Object Model (DOM): Objects and Collections.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
IMAGES Controlling size of images in CSS Aligning images in CSS Adding background images.
DHTML - Introduction Introduction to DHTML, the DOM, JS review.
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.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
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.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
_______________________________________________________________________________________________________________ Web Design in a Nutshell 2 nd Edition1.
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.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CSCI N341: Client-Side Web Programming Copyright ©2004  Department of Computer & Information Science Advanced DHTML.
Website Development with Dreamweaver
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
Working with Objects Creating a Dynamic Web Page.
Advanced DHTML.
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
 cascade Style Sheets (CSS) is a mark-up language that was first proposed in 1994 by Håkon Wium Lie. CSS works in conjunction with HTML to greatly increase.
XP Tutorial 12 New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
DHTML - Introduction Chapter Introduction to DHTML, the DOM, JS review.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
Chapter 8 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 8 Sebesta: Programming the World Wide Web.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
DHTML. What is it? Dynamic HTML. Not a standard unlike HTML or Java It is a term applied by both Netscape and Microsoft to a collection of technologies.
Cascading Style Sheets CSS. Source W3Schools
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages 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.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
Are You Smarter Than a 5 th Grader? 1,000,000 5th Grade HTML 5th Grade Syntax 4th Grade HTML 4th Grade Syntax 3rd Grade HTML 3rd Grade Syntax 2nd Grade.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
XP Tutorial 5 New Perspectives on JavaScript, Comprehensive1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Project 5: Customizing User Content Essentials for Design JavaScript Level Two Michael Brooks.
Introduction. MIS 5450 Behavioral Layer JavaScript and DOM Structural Layer XHTML Presentation Layer CSS Design Development Process.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Chapter 13: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
Working with Cascading Style Sheets
Week-12 (Lecture-1) Cascading Style Sheets (CSS): describe how documents are presented on screens. Types of Style Sheets: External Style Sheet - Define.
Website Design 3
Cascading Style Sheets - Building a stylesheet
The Web Wizard’s Guide To DHTML and CSS
DynamicHTML Cascading Style Sheet Internet Technology.
Working with Dynamic Content and Styles
DynamicHTML Cascading Style Sheet Internet Technology.
Web Design and Development
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

Project 7: Exploring DHTML Essentials for Design JavaScript Level Two Michael Brooks

Copyright (c) 2005 Prentice-Hall. All rights reserved. 2 Objectives Manipulate inline styles Interact with style sheets Control positioning dynamically Create a drop-down menu effect Use text style properties Incorporate background and display properties

Copyright (c) 2005 Prentice-Hall. All rights reserved. 3 Why Would I Do This? Dynamic HTML (DHTML) – describes the integration of JavaScript, CSS, and HTML  Use JavaScript to change CSS rules JavaScript style object created for each CSS style  Properties of style object correspond to attributes set in CSS declaration

Copyright (c) 2005 Prentice-Hall. All rights reserved. 4 Manipulating Inline Styles Elements referenced using the ID tag Style object in JavaScript represents style property of HTML tag Style object  Change CSS attributes by using the style object Only for inline style sheets, not for styles created in style sheet

Copyright (c) 2005 Prentice-Hall. All rights reserved. 5 Use Style Object Properties Return

Copyright (c) 2005 Prentice-Hall. All rights reserved. 6 Interacting with Style Sheets Use getElementById() method of the document object Use getElementById() method  Pass in id of the HTML element  Be careful of spelling and capitalization Once you have referred to the element, you can change any aspect of its style

Copyright (c) 2005 Prentice-Hall. All rights reserved. 7 Reference Style Attributes in JavaScript Return

Copyright (c) 2005 Prentice-Hall. All rights reserved. 8 Control Positioning Dynamically Animate a single image rather than loading multiple images Animate a single image Use HTML, CSS, and JavaScript to create effects  Use HTML to create and display image on screen  Use CSS to control placement and move image  Use JavaScript to create a loop to animate

Copyright (c) 2005 Prentice-Hall. All rights reserved. 9 Animate an Element Return

Copyright (c) 2005 Prentice-Hall. All rights reserved. 10 Creating a Drop-Down Menu Effect Useful when information on site fits into easy- to-understand categories Use different technologies to create  Use CSS to create menus  Use CSS visibility property to determine if menu is visible  Use JavaScript to detect when mouse rolls over  Use JavaScript to hide or display menu Use JavaScript to hide or display menu

Copyright (c) 2005 Prentice-Hall. All rights reserved. 11 Disadvantages of Drop-Down Menus Not compatible with older browsers Difficult to create menus

Copyright (c) 2005 Prentice-Hall. All rights reserved. 12 Show and Hide Menus Return

Copyright (c) 2005 Prentice-Hall. All rights reserved. 13 Using Font and Text Properties CSS provides greater control of fonts and appearance of text elements Use JavaScript to control fonts as user interacts with page Use JavaScript to control fonts

Copyright (c) 2005 Prentice-Hall. All rights reserved. 14 Common CSS Attributes color – sets or retrieves text color  Corresponds to JavaScript Color property font – sets or retrieves font properties  Corresponds to JavaScript Font property font-size – sets or retrieves font size  Corresponds to JavaScript FontSize property text-justify – sets or retrieves the type of alignment  Corresponds to JavaScript textJustify property

Copyright (c) 2005 Prentice-Hall. All rights reserved. 15 Use Text Properties Return

Copyright (c) 2005 Prentice-Hall. All rights reserved. 16 Incorporating Background and Display Properties Use JavaScript properties to specify and position background images Use JavaScript to layer elements on page  Often called swapping depths Use JavaScript to hide or display objects

Copyright (c) 2005 Prentice-Hall. All rights reserved. 17 Common Attributes background-attachment – sets or retrieves whether the background image stays fixed  Corresponds to JavaScript backgroundAttachment property background-image – sets or retrieves the background image  Corresponds to JavaScript backgroundImage property display – sets or retrieves whether object is rendered  Corresponds to JavaScript display property

Copyright (c) 2005 Prentice-Hall. All rights reserved. 18 Common Attributes (cont.) position – sets or retrieves the type of positioning  Corresponds to JavaScript position property  Can also specify posLeft, posRight, etc. visibility – sets or retrieves whether an object displays on screen  Corresponds to JavaScript visibility property z-index – sets or retrieves the stacking order  Corresponds to JavaScript zIndex property

Copyright (c) 2005 Prentice-Hall. All rights reserved. 19 Swap Depths Return