WEB DESIGN – SEC 4-11 PART OR ALL OF THIS LESSON WAS ADAPTED FROM THE UNIVERSITY OF WASHINGTON’S “ WEB DESIGN & DEVELOPMENT I ” COURSE MATERIALS PSEUDO-CLASS.

Slides:



Advertisements
Similar presentations
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
Advertisements

Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Some SpotLight in CSS. CSS element>element Selector div>p.
CHAPTER 8 ADVANCED CSS. LEARNING OBJECTIVES Assign formatting styles to a CSS class definition Use a tag’s class attribute to apply the styles defined.
Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
CM143 Web Week 6 Links & Navigation CSS Styling & Mouseovers.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
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.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links
CSS TutorialtMyn1 CSS Tutorial Cascading Style Sheets (CSS) are the modern standard for website presentation. When combined with a structural markup language.
Need to define two things: › The destination › Something to click on to get there  Tag is click here  Can be text, special character or image (next.
1 Lesson 5 Introduction to Cascading Style Sheets HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
“Cascading Style Sheets” for styling WWW information DSC340 Mike Pangburn.
ADVANCED CSS William Neely CEO, Piecewise.com. CSS FONTS AND TEXT CSS ‣ Line-height allows to indicate the amount of space between lines; allows for equal.
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.
Web Design – Sec 4-6 and 4-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Multimedia & The World Wide Web winny HCI 201 Multimedia and the www.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Using Styles and Style Sheets for Design
Unit 3, Lesson 3 Typography. art and technique of arranging type on a page. font family, style, size, and weight (or thickness)
Pre-Coding Web Design – Sec 3-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Styles with Cascading Style Sheets (CSS) Web Design – Section 4-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design.
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.
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.
How to get there from here. Lesson 5 – Unit E. Library.
Word 2010 Indents & Tabs In this lesson you will learn how to use the tab selector and the horizontal ruler to set tabs and indents.
Applying Color in CSS Web Design – Sec 4-5 Part or all of this lesson was adapted from the University of Washington’s “ Web Design & Development I ” Course.
How People with Disabilities Access the Web Web Design – Sec 2-5 Part or all of this lesson was adapted from the University of Washington’s “Web Design.
Linking to an External Style Sheet Web Design Section 4-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Special Links Web Design – Section 3-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
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.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
>> More on CSS Selectors. Pre-requisite Open the file called sample.txt Copy the all the text from the file Open your browser and go to codepen.io Paste.
Principles of Web Design 6 th Edition Chapter 9 – Site Navigation.
Stylizing a Navigation Menu with CSS Web Design – Section 4-13 Part or all of this lesson was adapted from the University of Washington’s “Web Design &
Adding Images to Your Web Page Web Design Section 5-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
INTRODUCTION TO HTML5 New HTML5 User Interface and Attributes.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Understanding ID and Class in CSS Web Design – Sec 4-9 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
External Style Sheets Exploring Computer Science – Lesson 3-6.
Cascading Style Sheets (CSS) EXPLORING COMPUTER SCIENCE – LESSON 3-5.
Microsoft Expression Web 3 – Illustrated Unit G: Designing Site Navigation.
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Creating Your Own Navigation Menu Web Design Section 6-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
The Box Model in CSS Web Design – Sec 4-8
Understanding and Applying Typography in CSS
Using JavaScript to Show an Alert
The Box Model in CSS Web Design – Sec 4-8
Applying CSS to Tables Stylish Tables.
Intro to Dreamweaver Web Design Section 8-1
Pre-Coding Web Design – Sec 3-1
Styles with Cascading Style Sheets (CSS)
Applying Typography in CSS
Understanding and Applying Typography in CSS
Styles with Cascading Style Sheets (CSS)
Cascading Style Sheets (Layout)
The Box Model in CSS Web Design – Sec 4-8
Inserting and Working with Links
>> Dynamic CSS Selectors
Cascading Style Sheets (Introduction)
Cascading Style Sheets (Introduction)
Presentation transcript:

WEB DESIGN – SEC 4-11 PART OR ALL OF THIS LESSON WAS ADAPTED FROM THE UNIVERSITY OF WASHINGTON’S “ WEB DESIGN & DEVELOPMENT I ” COURSE MATERIALS PSEUDO-CLASS SELECTORS IN CSS

OBJECTIVES The student will: Be able to use the :hover, :focus, and :active CSS pseudo-classes on a web page to help the user track their current position on the page. Be able to use the :first-letter pseudo-class to distinctly stylize the first letter of a block of text.

PSEUDO-CLASSES CSS pseudo-classes are used to add styles to selectors, but only when those selectors meet certain conditions. A pseudo class is expressed by adding a colon (:) after a selector in CSS, followed by a pseudo-class such as "hover", "focus", or "active", like this: a:hover { /* your style here */ }

PSEUDO-CLASSES The idea with pseudo-classes is that you can stylize elements differently when users are hovering over them (:hover) or tabbing to them with the keyboard (:focus) or at that exact moment when users are selecting a link (:active). You can also stylize links differently after users have visited them (:visited). There are many other pseudo-classes available. See the W3Schools CSS Pseudo-classes page for more information.W3Schools CSS Pseudo-classes page

USING CSS PSEUDO-CLASSES TO HIGHLIGHT USER'S POSITION When a user points to an object on a web page with a mouse, it's helpful if that object responds in some way. For example, when a user hovers over a link, the color and background-color of that link could be reversed. In the following example CSS, all links on a page are stylized as black on a white background, but when a user hovers over the colors are reversed. a { color: black; background-color: white; } a:hover { color: white; background-color: black; }

USING CSS PSEUDO-CLASSES TO HIGHLIGHT USER'S POSITION For people who are navigating by keyboard (for example, by pressing tab to move through links on the page), this functionality is even more critical, because it's often very difficult for keyboard users to keep track of their location on the page. Most web browsers provide some visual indication of which element currently has focus, but in some of the leading browsers this is simply a thin dotted line that is very difficult, if not impossible, to see, especially against certain backgrounds. To add the same functionality for both keyboard and mouse users, we simply add the :focus pseudo-class to our earlier definition, like this: a { color: black; background-color: white; } a:hover, a:focus { color: white; background-color: black; }

REST OF TODAY Download Homework 4-11 from the Hancock Website. Complete the changes. You will add :hover and :focus CSS code for your “a” links and customize the first letter in your overview paragraph.

REST OF TODAY Your page should look something like this…