Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

Cascading Style Sheets
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.
HTML – A Brief introduction Title of page This is my first homepage. This text is bold  The first tag in your HTML document is. This tag tells your browser.
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.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
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.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Chapter 6 Web Typography
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
SM5312 week 6: basic CSS syntax1 An Introduction to Cascading Style Sheets Basic CSS Syntax Nick Foxall.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
© 2007 D. J. Foreman CSS-1 Cascading Style Sheets Styles.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Week 4.  Three ways to apply CSS: Inline CSS Internal style sheets ( header style information) External style sheets.
The Characteristics of CSS
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.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit E Formatting with Cascading Style Sheets.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
CO1552 – Web Application Development Cascading Style Sheets.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
ALBERT WAVERING BOBBY SENG. Week 2: HTML + CSS  Quiz  Announcements/questions/etc  Some functional HTML elements.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
HTML - Quiz #2 Attendance CODE:
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
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.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
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.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Developing Web Applications with HTML and CSS “Selectors and Properties”
CSS: Cascading Style Sheets Part II. Style Syntax.
CSS Cascading Style Sheets *referenced from
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.
Basic Webpage Design Cascading Style Sheet (CSS).
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets
Cascading Style Sheets 2
Cascading Style Sheets
Presentation transcript:

Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates

CSS Benefits Separates content from presentation Global presentation changes from one file Conserves bandwidth Simpler code is easier to update Increasingly browser friendly Better accessibility Cures the common cold Great on sandwiches

CSS Anatomy Selector p Declaration {color: yellow;} - Property: Value Multiple declarations {color: yellow; background: transparent;} Grouped Selectors p, li {color: yellow} Inherited Properties body {font-family: sans- serif} - Override inheritance with specific property - Contextual: can override coding in content

Object Identifiers Use as a “style” for content when content is identified with that id Make an element id “mainpoint” - #mainpoint p {font-style: strong; text-align: center; margin-bottom: 1em;} Use the element id - This will be on the test. Use in combination with Contextual Selectors to manipulate presentation in combinations It’s like using programming logic!

Calling and Referencing only works in 5.0+ browsers: useful for customizing for newer browsers You could link to styles on other sites (url) Embedding styles in a document not recommended - Less flexibility - More coding (there’s always another page or another version of the same page) Inline styles in the tag

CSS Flexibility Different style sheets for different uses - Browsing Versions and platforms - Printing 8.5 x 11 PDA-sized with text breaks - Searching ? Highlighting query term Abstracted elements from document – “id=abstract” Relative style file locations might be used for advanced style logic

Document Styles – Body Tags - Margins - spacing (padding) - Indenting - colors (backgrounds and text) - Images - Fonts - Line height (double-spaced Web papers) - Headers - Footers - What else?

Page Divisions Content Divs Sidebars (Columns) Navigation (and Site) - Bars - Tabs - Link sets - Rollovers “You are Here” effect - a:visited - Colors - Graphics

Styles Content should match style Users (their browsers) should be able to perform all user stories (tests) Applications may use styles differently than pages with just text - Forms - Styling for Navigation – Menus See Designing CSS Web PagesDesigning CSS Web Pages - Code Samples Code Samples - Web Resources Web Resources DOCTYPES Templates for different styles of documents

CSS Beyond the Screen Making a printable Web page - Set each type of style (there are others too) to use the elements that are appropriate for each Footers, navigation, sidebars, breadcrumbs - Change text characteristics to suit Font style, font size, italics/underlines Make headings more unique in print Margins for reading vs. ease of printing

Printing with links A { color:#000; (this is black) Font-weight: bold; Text-decoration: none;} #content p a:after,.info ul li a:after {content: “a ”; } See p 169

Proofing CSS Not all CSS features work perfectly on all browsers - Ensure compatibility with IE 6.x & Mozilla 1.x or Firefox 1.x - Verify with alternate font sets (internationalization issues) 508 compliance with CSS too - Use true headings and formatting, not styles - Use “alt” or “longdesc” for elements - Use good naming conventions Not “red” for required fields or “go” for input buttons - Keep form fields in order

Setting Up Styles Examine existing style sheets (if any) Look at page(s) with & without styles Types of style selectors: - Generic - HTML - Descendants - associated elements Child - inherited Adjacent Sibling - similar, but specific - Universal - all elements - Class- “class” attribute - ID - “if” attribute

iSchool.css.nav { color: #6699CC; font-size: 12px; font-family: Arial, Helvetica, sans-serif; text-decoration: none}.nav:hover { color: #FF9933; font-size: 12px; font-family: Arial, Helvetica, sans-serif; text-decoration: underline}.nav_selected { font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #FF9933; font-size: 12px; text- decoration: none}.external_link { font-style: italic } h1 { font-size: 20px; font-family: Arial, Helvetica, sans-serif; font-weight: normal; color: #FF9933} h2 { font-size: 16px; font-family: Arial, Helvetica, sans-serif; font-weight: normal} h3 { font-size: 14px; font-family: Arial, Helvetica, sans-serif; font-weight: bold} h3 { font-family: Arial, Helvetica, sans-serif; font-weight: bold} a { color: #6699CC } a:hover { color: #FF9933 }.external { font-style: italic } td { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333} th { font-family: Arial, Helvetica, sans-serif; font-size: 12px} p { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333} body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}.page_title { font-size: 22px; color: #FF9933; font-family: Arial, Helvetica, sans-serif}.title {font-size: 22px; color: #6699CC; font-family: Arial, Helvetica, sans-serif; text-decoration: none}.title:hover {font-size: 22px; color: #FF9933; font-family: Arial, Helvetica, sans-serif; text-decoration: none} ul { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: # } ol { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: # } li { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}

Calling and Referencing CSS iSchool only works in 5.0+ browsers: useful for customizing for newer browsers You could link to styles on other sites (url)

How do you want to cascade? Multiple css? Per page type? How many columns? - What design style? - No tables at all? Printing for reference vs. viewing online Validating styles and markup

CSS Tools CSS Edit (Macintosh)CSS Edit TopStyle Pro (Windows)TopStyle Pro Dreamweaver (both)Dreamweaver StyleMaster (both)StyleMaster Text editors

Projects Review & Explanation Take 10 minutes to explain your project Show them your designs - Designs should be Web accessable by now