>> Dynamic CSS Selectors

Slides:



Advertisements
Similar presentations
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
Today CSS HTML A project.
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.
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.
CSS Link Styling. The Anchor Element: Link text between the opening and closing can be styled using CSS. Some of the properties that can be set are: font-family,
Today’s objectives  Element relations – tree structure  Pseudo classes  Pseudo elements.
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.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
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.
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
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.
Design, Formatting, CSS, & Colors 27 February, 2011.
Controlling Page Style: Cascading Style Sheets (CSS) References: 1.Wang, P.S & Katila, S. (2004). A Introduction to Web Design and Programming. CA: Thomson.
4.01 Cascading Style Sheets
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Doman’s Sections Information in this presentation includes text and images from
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
 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.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
How to get there from here. Lesson 5 – Unit E. Library.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
>> 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.
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
Company LOGO In the Name of Allah,The Most Gracious, The Most Merciful King Khalid University College of Computer and Information System Web pages Development.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Links All CSS properties can be applied on links (i.e. change colors, fonts, underline, etc). The new thing is that CSS allows you to define these properties.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
Introduction to CSS: Selectors
Cascading Style Sheets
4.01 Cascading Style Sheets
Cascading Style Sheets
>> Introduction to CSS
>> The “Box” Model
>> More on CSS Selectors
Cascading Style Sheets
>> CSS Rules Selection
Web Developer & Design Foundations with XHTML
Cascading Style Sheets contd: Embedded Styles
Cascading Style Sheets
Cascading Style Sheets (Layout)
Cascading Style Sheets
Introduction to web design discussing which languages is used for website designing
CSS Intro.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
CSS Cascading Style Sheets
The Web Wizard’s Guide To DHTML and CSS
The Internet 10/6/11 Cascading Style Sheets
Cascading Style Sheets
CSS Styles Introduction.
Part 1: Cascading Style Sheets
Cascading Style Sheets
4.01 Cascading Style Sheets
Web Client Side Technologies Raneem Qaddoura
Introduction to Styling
Presentation transcript:

>> Dynamic CSS Selectors

Pre-requisite Download and open the file called selectors-dynamic.html Open the file in the editor

Web-Based Systems - Misbhauddin Styling Dynamically Can be done by CSS for specific cases Also called Pseudo selectors Types of Pseudo Selectors Pseudo-Class Selectors Pseudo-Element Selectors Apply styles to part of other actual elements that cannot be shown in the DOM tree Select elements that can't be expressed using attributes, IDs or classes LINK FORM Web-Based Systems - Misbhauddin

Link Pseudo Class Selector Link States Page loads Click [Button Pressed] Mouse Over ACTIVE LINK HOVER Mouse Over Move out Clicked [Button Released] Mouse Out VISITED Web-Based Systems - Misbhauddin

Link Pseudo Class Selector Use “:” after the selector LINK State a:link {} VISITED State a:visited {} HOVER State a:hover {} ACTIVE State a:active {} Specifying them in order is ideal Easy way to cover them all: LOVE/HATE L :link O V :visited E H :hover A :active T E Weight is equal to a class selector Web-Based Systems - Misbhauddin

Web-Based Systems - Misbhauddin TRY NOW Style the hyperlink with the following specifications Link: red Visited: green Hover: blue Active: yellow Use attribute color HINTS: Web-Based Systems - Misbhauddin

Form Pseudo Class Selectors Use “:” after the input selector :hover :focus :required :valid :invalid Web-Based Systems - Misbhauddin

Web-Based Systems - Misbhauddin TRY NOW For the email input type Invalid: background color to red Valid: background color to green Hover: background color to yellow Focus: outline 1px solid black For the password input type required: border color to red Use attribute background-color border: 5px solid black border-color HINTS: Web-Based Systems - Misbhauddin

Some Pseudo Element Selectors Use “::” after the selector ::first-line ::first-letter Web-Based Systems - Misbhauddin

Web-Based Systems - Misbhauddin TRY NOW For the all paragraphs first-letter: font size to 30px HINTS: Use attribute font-size Web-Based Systems - Misbhauddin

Next on Web-based Systems Cascading Style Sheets - Rules The “Box Model” in CSS Using to format the layout of an HTML page Using <div>, <span> tags and CSS code Details on Selectors and Properties http://css-tricks.com/almanac/