Cascading Style Sheets Level 2. Course Objectives, Session 1 Level 1 Quick Review Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your.

Slides:



Advertisements
Similar presentations
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Cascading Style Sheets
Today CSS HTML A project.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Cascading Style Sheets Basics. Why use Cascading Style Sheets? Allows you to set up a series of rules for all pages in a site. The series may be changed.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
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.
กระบวนวิชา 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.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
Chapter 6 Web Typography
AD Intermediate Computer Graphics | spring 2008 | Daria Tsoupikova | School of Art and Design | UIC CSS Cascading Style Sheets.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
4.01 Cascading Style Sheets
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
HTML - Quiz #2 Attendance CODE:
Cascading style sheets (CSS)
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 4.  Three ways to apply CSS: Inline CSS Internal style sheets ( header style information) External style sheets.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
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.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
CO1552 – Web Application Development Cascading Style Sheets.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
CSS Basic (cascading style sheets)
CSS. HTML: Looking Back HTML dictates order, structure, and function Does very little to specify layout or visual rendering.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Using the CSS. What is CSS? CSS is a language that’s used to define the formatting applied to a Website, including colors, background images, typefaces.
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.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
CSS Cascading Style Sheets. Cascading Style Sheet (CSS) A cascading style sheet (CSS) is a set of rules that define styles to be applied to entire Web.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
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.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
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.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Styles and the Box Model
Cascading Style Sheets
Presentation transcript:

Cascading Style Sheets Level 2

Course Objectives, Session 1 Level 1 Quick Review 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 14: Responsive Web Design If time, Chapter 16: CSS for the Printed Page

3 Layers of Web Page Construction

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

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

CSS Level 1 Review, Where CSS Lives Internal (Embedded) Style Sheets Goes inside the of the html page All internal styles are encased around the tag Inheritance In Action p { color: #FF6600; border-left: solid 25px #BD8100; }.pageStyle { font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; font-size: 18px; } Page 40

CSS Level 1 Review, Where CSS Lives External Style Sheets CSS lives in a separate file with a.css extension Use the tag to reference the CSS file (within the ) Inheritance In Action Page 41

CSS Level 1 Review, Selectors Tag Selectors Can use any HTML tag as a selector body, div, section, nav, footer… 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) Pages 56-61

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 Descendent Selectors Pinpointing to a specific situation h1 strong { color: red; } The above example means, Look for a tag and then inside there, look for a tag. If this situation is found, change the font color of whatever is inside the tag to red. Try not to create overly complex descendent selectors Pages 62-66

CSS Level 1 Review, Family Tree Ancestor Descendent Parent Child Sibling Pages 64-65

CSS Level 1 Review, Inheritance 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 Pages 93-96

CSS Level 1 Review, The Cascade Inherited Styles Accumulate The most specific selector wins Pages Selector TypePoints Tag (h1)1 Class (.alert)10 ID (#main-content)100 Inline ( )1000 (try to avoid this) SelectorIDCLASSTAGTotal Points p0011.byline01010 p.byline01111 #banner a:link01111 h2 strong0022

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 to to checkhttp:// Popular Units of Measurements px – pixels (finite) % - percentage (relative) em – ems (relative) Styling Lists Pages

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

CSS Level 1 Review, Box Model Pages Margin Border Padding

Element Dimensions 300px W Content 10 px padding all around = 320 px wide element Pages

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

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

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

CSS Level 1 Review, Web Fonts Font files stored on a web font-family Host the font files yourself Pages Use a service (Google) Pages Pages

Let’s now begin CSS Level 2 Starting on page 239, Adding Graphics to Web Pages

Let’s now continue on with Styling Forms in Chapter 11, Starting on page 384