Cascading Style Sheets Level 2

Similar documents
CSS.

CSS Cascading Style Sheets

Styles, Style Sheets, the Box Model and Liquid Layout

CSS Cascading Style Sheets

Assignments (4) Assessment as per Schedule (2)

CSS: The Basics CISC 282 September 20, 2014

CSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

Cascading Style Sheets (CSS)

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

the missing manual0 O'REILLY Third Edition David Sawyer McFarland Beijing Cambridge The book that should have been in the box Farnham

CSS: Cascading Style Sheets

Introduction to WEB PROGRAMMING

The Benefits of CSS. Less work: Change look of the whole site with one edit

CSS 1: Introduction. Chapter 3

COMS 359: Interactive Media

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Let s start with the document tree

To link to an external stylesheet, the link element is placed within the head of the html page:

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

CSS Selectors. element selectors. .class selectors. #id selectors

Creating and Building Websites

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

CSS: Cascading Style Sheets

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

CE419 Web Programming. Session 3: HTML (contd.), CSS

Block & Inline Elements

ITSE 1401 Web Design Tools Lab Project 4 (Expression Web 4 - Units M, N, O, P) Last revised: 1/9/14

Zen Garden. CSS Zen Garden

CSS. Shan-Hung Wu CS, NTHU

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 3 Test Bank

Lab Introduction to Cascading Style Sheets

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

CSS worksheet. JMC 105 Drake University

To illustrate how to set TAG styles the <body> and <h1> tags (for the BODY and the HEADING 1 styles) will be adjusted.

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets

BIM222 Internet Programming

Web Development & Design Foundations with HTML5

INTRODUCTION TO HTML5! CSS Styles!

2. Write style rules for how you d like certain elements to look.

Web Development & Design Foundations with HTML5

HTML & CSS November 19, 2014

Introduction to Computer Science Web Development

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Website Development with HTML5, CSS and Bootstrap

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Web Structure and Style. MB2030 Section 2 Class 4

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

ITNP43: HTML Lecture 4

CS193X: Web Programming Fundamentals

Chapter 3 Style Sheets: CSS

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

Introduction to Web Tech and Programming

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

CSS: Beyond the Code. Karen Perone Rodman Public Library.

HTML/XML. HTML Continued Introduction to CSS

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST

CS193X: Web Programming Fundamentals

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

Tutorial 3: Working with Cascading Style Sheets

CSS

Diploma in Digital Applications Unit 5: Coding for the Web

CSS is applied to an existing HTML web document--both working in tandem to display web pages.

Chapter 7 BMIS335 Web Design & Development

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube {

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Controlling Appearance the Old Way

INTRODUCTION TO CSS. Topics MODULE 5


Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Intermediate Web Publishing: Working with Styles

Using Dreamweaver CS6

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

CPET 499/ITC 250 Web Systems. Topics

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

By Ryan Stevenson. Guidebook #3 CSS

Reading 2.2 Cascading Style Sheets

CSS: formatting webpages

ID1354 Internet Applications

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Web Design and Development Tutorial 03

Chapter 4 CSS basics

Appendix D CSS Properties and Values

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

Adding CSS to your HTML

IDM 221. Web Design I. IDM 221: Web Authoring I 1

Data Visualization (CIS/DSC 468)

2005 WebGUI Users Conference

Transcription:

Cascading Style Sheets Level 2

Course Objectives, Session 1 Level 1 Quick Review Chapter 6 Revisit: Web Fonts Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your Site s Navigation Begin Chapter 11: Formatting Tables and Forms

Course Objectives, Session 2 Finish Chapter 11: Formatting Tables and Forms Chapter 12: Introducing CSS Layout Chapter 15: Responsive Web Design If time allows: Chapter 14: Positioning Elements on a Web Page

3 Layers of Web Page Construction http://reference.sitepoint.com/css/css

CSS Level 1 Review, HTML Tags <div> tag HTML Block level element, creates spacing before and after itself <span> tag HTML Inline level element, does not affect the spacing before and after itself Additional tags are referenced on page 23

CSS Structure Pages 22-23 Declaration Selector Property Value p { } color: red; font-size: 1.5em; Declaration Block

CSS Level 1 Review, Where CSS Lives Internal (Embedded) Style Sheets Goes inside the <head> of the html page All internal styles are encased around the <style> tag <head> <meta charset="utf-8"> <title>inheritance In Action</title> <style> p { color: #FF6600; border-left: solid 25px #BD8100; }.pagestyle { font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; font-size: 18px; } </style> </head> Page 25

CSS Level 1 Review, Where CSS Lives External Style Sheets CSS lives in a separate file with a.css extension Use the <link> tag to reference the CSS file (within the <head>) Page 26 <head> <meta charset="utf-8"> <title>inheritance In Action</title> <link href= styles/styles.css" rel="stylesheet"> </head>

CSS Level 1 Review, Selectors Tag Selectors Can use any HTML tag as a selector body, div, section, nav, footer Pages 42-48 Class & Id Selectors You create the name, should be something meaningful Only allowed to use letters, numbers, hyphens and underscores Class name always starts with a period. and then a letter ID name always starts with a period # and then a letter Case sensitive 2 step deal: Needs to be a definition (internal or external location) and a reference (class= alert or id= main-content ) Class can be referenced in multiple HTML tags on the same page ID can only be reference ONCE per page (try to avoid creating ID CSS)

CSS Level 1 Review, Selectors Grouped Selectors Selector names are separated with a comma, Think of the comma as or Use to keep code efficient and more organized Pages 49-54 Descendent Selectors Pinpointing to a specific situation h1 strong { } color: red; The above example means, Look for a <h1> tag and then inside there, look for a <strong> tag. If this situation is found, change the font color of whatever is inside the <strong> tag to red. Try not to create overly complex descendent selectors

CSS Level 1 Review, Family Tree Ancestor Descendent Parent Child Sibling Pages 51-52

CSS Level 1 Review, Inheritance Pages 85-89 The process by which some CSS properties applied to one tag are passed on to nested tags font property is inherited border property is not inherited

CSS Level 1 Review, The Cascade Inherited Styles Accumulate The most specific selector wins Selector Type Points Pages 98-104 Tag (h1) 1 Class (.alert) 10 ID (#main-content) 100 Inline (<h1 style= font:blue; >) 1000 (try to avoid this) Selector ID CLASS TAG Total Points p 0 0 1 1.byline 0 1 0 10 p.byline 0 1 1 11 #banner 1 0 0 100 a:link 0 1 1 11 h2 strong 0 0 2 2

CSS Level 1 Review, Formatting Text Properties Multitude of formatting like changing the font family, color, bolding, spacing, and even adding a drop shadow Remember older browsers will not recognize new CSS properties. Can go here to check: http://www.w3schools.com/ http://caniuse.com/ Popular Units of Measurements px pixels (finite) % - percentage (relative) em ems (relative) Styling Lists Pages 121-172

CSS Level 1 Review, Box Model Pages 185-204 Margin Border Padding Colliding Margins Using Negative Numbers (with margin property) Borders Rounded Corners Drop Shadows

CSS Level 1 Review, Box Model Pages 193-212 Margin Border Padding

Pages 204-206 Element Dimensions 10 px padding all around 300px W Content 300 + 10 + 10 = 320 px wide element

Element Dimensions 10 px padding all around 300px W Content 1 px border all around 300 + 10 + 10 = 320 px wide element 300 + 10 + 10 + 1 +1 = 322 px wide element

Element Dimensions 25 px margin-left 10 px padding all around 300px W Content 1 px border all around 300 + 10 + 10 = 320 px wide element 300 + 10 + 10 + 1 +1 = 322 px wide element 300 + 10 + 10 + 1 +1 + 25 = 347 px wide element

Element Dimensions 347 px wide 25 px margin-left 10 px padding all around 300px W Content 1 px border all around 300 + 10 + 10 = 320 px wide element 300 + 10 + 10 + 1 +1 = 322 px wide element 300 + 10 + 10 + 1 +1 + 25 = 347 px wide element

Let s now begin CSS Level 2 Starting on page 127, Using Web Fonts