Using Styles and Style Sheets for Design

Slides:



Advertisements
Similar presentations
Introduction to HTML & CSS
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Today CSS HTML A project.
Project 8 Creating Style Sheets.
Lesson 4: Styling Your Pages with CSS Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
1 Lesson 5 Introduction to Cascading Style Sheets HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
Chapter 8 Creating Style Sheets.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Ch. 5 Web Page Design – Templates and Style Sheets Mr. Ursone.
Chapter 3 Working with Text and Cascading Style Sheets.
16 HTML Tables and Frames Section 16.1 Create a basic table using HTML Define borders Merge cells Align content in tables Section 16.2 Create a frames-based.
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Working with Text and Cascading Style Sheets Adobe Dreamweaver Chapter 3.
© 2011 Delmar, Cengage Learning Chapter 2 Developing a Web Page.
© 2010 Delmar, Cengage Learning Chapter 7 Using Styles and Style Sheets for Design.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Dreamweaver MX. 2 Creating External Style Sheets-1 (p. 400) n A style is a group of formatting attributes identified by a single name. n An ________ style.
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.
Chapter 3 Working with Text and Cascading Style Sheets.
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.
Chapter 2 Developing a Web Page. Chapter 2 Lessons Introduction 1.Create head content and set page properties 2.Create, import, and format text 3.Add.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: –The head content –The body Creating Head Content and Setting Page Properties.
Intro to Dreamweaver Web Design Section 7-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: – The head content – The body Creating Head Content and Setting Page.
© 2011 Delmar, Cengage Learning Chapter 8 Using Styles and Design Style Sheets for Design.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Adobe Dreamweaver CS3 Revealed CHAPTER THREE: WORKING WITH TEXT AND IMAGES.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Project 4: Yosemite CSS Layout
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
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.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Text and Cascading Style Sheets.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 8: Working with Style Sheets.
Tutorial 3 Adding and Formatting Text with CSS Styles.
Cascading Style Sheets CSS. Source W3Schools
Macromedia Dreamweaver 8 Revealed AND GRAPHICS WORKING WITH TEXT.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
XP Dreamweaver MX 2004 Tutorial 3 1 Adding and Formatting Text.
HTML5 and CSS3 Illustrated Unit C: Getting Started with CSS.
Tutorial 3 Adding and Formatting Text. Objectives Session 3.1 – Type text into a page – Copy/paste text from a Word document – Check for spelling errors.
COMP 143 Web Development with Adobe Dreamweaver CC.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Working with Cascading Style Sheets
Getting Started with CSS
Chapter 2 Developing a Web Page.
Cascading Style Sheets
Madam Hazwani binti Rahmat
Unit Objectives Create a new page Import text Set text properties
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Working with Text and Cascading Style Sheets
Using Cascading Style Sheets (CSS)
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Chapter 6 Introducing Cascading Style Sheets
Exercise 24 – Software Skills
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Presentation transcript:

Using Styles and Style Sheets for Design Chapter 8 Using Styles and Style Sheets for Design

Chapter 7 Lessons Introduction Create and use embedded styles Modify embedded styles Use CSS3 and Media Queries Work with conflicting styles

Using Cascading Style Sheets Introduction Using Cascading Style Sheets Most powerful method to ensure that all elements in a website are formatted consistently External – Formatting rules kept in a separate file Every page attached to external style sheet will update when style sheet file is modified Better practice for formatting code to be in separate external file Embedded – style code is located within the head section of the HTML code of a web page Embedded styles do not format website content globally

Using Styles and Style Sheets Lesson 1: Create and Use Embedded Styles Using Styles and Style Sheets Embedded CSS styles Styles whose code is located in the head section of the HTML code of a Web page An embedded style overrides an external style Inline Style Part of individual page code in body section Refers to specific instance of Tag, rather than global tag

Creating and Applying a Custom Style Lesson 1: Create and Use Embedded Styles Creating and Applying a Custom Style A Custom (or class) Embedded Style contains a combination of formatting attributes that can be applied to a block of text or other page elements To create a new custom style, use the New CSS Rule dialog box To specify the new style as an embedded style, Rule Definition location should be “This Document Only” Custom Embedded Style name begins with a period (.)

Creating and Applying a Custom Style – cont. Lesson 1: Create and Use Embedded Styles Creating and Applying a Custom Style – cont. Rule in CSS Panel – Custom Style with . Class Selector Rule Name Rule Location

Creating and Applying a Custom Style – cont. Lesson 1: Create and Use Embedded Styles Creating and Applying a Custom Style – cont. To add a Custom Style to a block of text or a page element: Select the page element or block of text using the Custom Style Access the HTML Property Inspector or CSS Property Inspector Select the Custom Style from the Class List Box in the HTML Property Inspector or the Targeted Rule List Box in the CSS Property Inspector

Using Styles and Style Sheets – Inline Styles Lesson 1: Create and Use Embedded Styles Using Styles and Style Sheets – Inline Styles Rule in CSS Panel – Inline Style with # ID Selector Rule Name Rule Location

Using Styles and Style Sheets – Inline Styles Lesson 1: Create and Use Embedded Styles Using Styles and Style Sheets – Inline Styles To add an Inline Style to a page element: Select the page element using the Inline Style Access the HTML Property Inspector Select the Inline Style from the ID List Box

Editing Styles Lesson 2: Modify Embedded Styles Editing a style can be done using various methods: CSS Properties Inspector CSS Rule Definition dialog box Accessed through Edit Rule button in either the CSS Styles Panel or the CSS Property Inspector CSS Styles Panel Properties Pane Edit code of Embedded CSS Style found in the Head Section of page HTML Code

Lesson 2: Modify Embedded Styles Editing Styles – cont.

Redefining HTML Tags Lesson 2: Modify Embedded Styles When you use the Property inspector to format a web page element, a predefined HTML tag is added to that element Once you save the rule and apply it, the tags you target will be formatted according to the altered settings you specified

Redefining HTML Tags Lesson 2: Modify Embedded Styles To change the definition of an HTML tag: 1. Specify Tag to redefine HTML element 2. Choose HTML element to redefine 3. Specify where Rule should be saved (embedded or external) 4. Use the CSS Rule Definition dialog box to redefine HTML element

Adding Hyperlink Rules to a CSS Style Sheet Lesson 2: Modify Embedded Styles Adding Hyperlink Rules to a CSS Style Sheet Compound selectors are used to create styles for a combination of rules Class, ID, or Tag Compound rules are also used to style states of a tag Compound rule can be created to style the way a link looks when you hover over it with your cursor a:link – unvisited link a:visited – visited link a:hover – link when mouse is hover over it

Adding Hyperlink Rules to a CSS Style Sheet Lesson 2: Modify Embedded Styles Adding Hyperlink Rules to a CSS Style Sheet To create styles for all links using a style sheet: 1. Specify Compound for links 2. Choose link selector from list 3. Specify where Rule should be saved (embedded or external) 4. Use the CSS Rule Definition dialog box to redefine link rule

CSS Styles Panel – All vs. Current Lesson 2: Modify Embedded Styles CSS Styles Panel – All vs. Current Summary for Selection Pane All Rules Pane Rules Pane Properties Pane Properties Pane

Understanding CSS3 Features Lesson 3: Use CSS3 and Media Queries Understanding CSS3 Features CSS3 is the latest version of CSS being developed by the World Wide Web Consortium (W3C) CSS3 introduced improved coding techniques, such as new tags to insert audio and video objects Examples: WOFF (Web Open Font Format) fonts: @font-face property allows a browser to access and deliver a specified font Semantic coding: values such as “small” or “large” instead of pixels for text properties Rounded Corners of div tags Tabs and Accordions for navigation

Media Queries and Adaptive Websites Lesson 3: Use CSS3 and Media Queries Media Queries and Adaptive Websites Media Query are files that specify set parameters for displaying pages on separate devices, such as tablets or smart phones Media Queries specify a different style sheet for each device: a style sheet for a desktop monitor, a style sheet for a tablet, and a style sheet for a cell phone Adaptive websites are websites that adjust or modify the page content to fit the user’s needs and device type used to view the site

Validating for CSS3 Standards Lesson 3: Use CSS3 and Media Queries Validating for CSS3 Standards Validate your CSS3 code is compliant with today’s standards before publishing Utilize free validation service through W3C.org to check style sheets

Adobe BrowserLab Lesson 3: Use CSS3 and Media Queries Online service that you can access through Dreamweaver to test your site with multiple browsers, without needing to have the browser programs installed on your computer Provides online viewing, as well as diagnostic and comparison tools

The Order of Precedence Lesson 4: Work with Conflicting Styles The Order of Precedence Cascading refers to the way styles are ranked in order of precedence as they are applied to page elements Style sheets originate from three sources: the author, who is the creator of the page and style sheet the user, or person who is viewing the page the user agent, the software through which the page is delivered The first order of precedence is to find declarations that specify and match the media type being used, such as a computer screen

The Order of Precedence Lesson 4: Work with Conflicting Styles The Order of Precedence The second order of precedence is by importance and origin as follows: user important declarations author important declarations author normal declarations user normal declarations user agent declarations The third order of precedence is by specificity of the selector The fourth order of precedence is by order specified in the code Imported, or external style sheets, are considered to be before any internal styles

Using Tools to Manage Styles Lesson 4: Work with Conflicting Styles Using Tools to Manage Styles The Browser Compatibility Check feature flags issues on a page that may present a problem when viewed in a particular browser Inspect mode helps you to identify HTML elements and their associated styles Disable/Enable CSS allows you to disable a rule property in Design view so you can compare the effects of the affected page element with and without that property