 Capstone Proposals Due on Feb 23 › Must be a web site › Capstone Project Description sp 09.htm Capstone Project Description sp 09.htm  Assignment 3.

Slides:



Advertisements
Similar presentations
Intro To Cascading Style Sheets By Mario Yannakakis.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
COS 125 Internet Fundamentals and Web Page Design Day 3.
Cascading Style Sheets
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Today CSS HTML A project.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
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.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
กระบวนวิชา 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.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
COS 125 Day 17. Agenda Assignment #4 Corrected – 4 A’s, 5 B’s, 3 C’s, and 3 non-submits Assignment #5 Due Exam #3 Corrected – 5 A’s, 5 B’s, 2 C’s, 2 D’s.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic CSS: Cascading Style Sheets.
COS 125 Day 13. Agenda Capstone Projects Proposals Over Due Timing of deliverables is 10% of Grade Still missing two First Capstone Progress Report Due.
COS 125 Day 13. Agenda Capstone Progress Reports Due Quiz #2 Graded 7 A’s, 3 B’s, 3 C’s and 1 no-take Assignment #3 due this Friday We review some of.
COS 125 DAY 15. Agenda Assignment 4 Posted Corrected –4 A’s, 3 B’s, 2 C’s and 1 MIA Assignment 5 posted –Due April 4 Left to do –4 Assignments (9 total)
COS 125 Internet Fundamentals and Web Page Design Day 11.
COS 125 Day 17. Agenda Assignment #4 due Assignment #5 due next class Capstone Progress Reports Due Exam #3 will March 26 – Castro Chaps 1-7 Lecture/Discuss.
COS 125 Internet Fundamentals and Web Page Design Day 12.
COS 125 DAY 18. Agenda Assignment #4 Corrected –6 A’s, 1 B, 2 C’s, 1 D, 1 F and 2 non-submits Assignment #5 Due Capstone Progress Reports Due Exam #3.
COS 125 Internet Fundamentals and Web Page Design Day 11.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
Creating a Simple Page: HTML Overview
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
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.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
INTRODUCTION TO HTML5 CSS Styles. Understanding Style Sheets  HTML5 enables you to define many different types of content on a web page, including headings,
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of 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 Orientation Learning Web Design: Chapter 11.
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)
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.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
CS 174: Web Programming September 9 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
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.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, Third Edition.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
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.
Internet & World Wide Web How to Program, 5/e 1. 2.
4.01 Cascading Style Sheets
CSS: Cascading Style Sheets
Cascading Style Sheets Part 1
Cascading Style Sheets
Using Cascading Style Sheets Module B: CSS Structure
Cascading Style Sheets
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Cascading Style Sheets
4.01 Cascading Style Sheets
CS332A Advanced HTML Programming
Presentation transcript:

 Capstone Proposals Due on Feb 23 › Must be a web site › Capstone Project Description sp 09.htm Capstone Project Description sp 09.htm  Assignment 3 Corrected › 4 A’s, 3 B’s, 2 C’s & 1 D  Assignment 4 Posted › Due February 9:35 AM  Quiz 1 will be on March 2 › Chapters 1-6 › 20 m/c and 4 short essay › Open book, open notes  Lecture/Discuss Creating and Applying Styles

Work in CODE mode not design!!  A Title of “assignment #3” › …… assignment #4 …..  A least 3 of the 6 possible Section headers › Give each header a name and a title   A division, a paragraph and an in-line span ›  Add some comments › Your name › Date you created this web page 

 Bold ›  Italic ›  Preformatted text ›  Big and small text ›  Monospaced text ›  Quoted text (with reference) ›  Superscript and subscript ›

 A transparent gif of your name (Image 1)  A animation of your name (Image 2)  A photorealistic image downloaded from the web (Image 3)  Recompress to smaller file size but the same image size (Image 4) › Page 100 of text  Resize to half the original size (Image 5) › Use PSP

 Make sure each image has alternate text and a title ›  Make sure you specify size for each image ›  Rescale image 3 to 50% of Browser viewable width ›  Create some text describing Image 3 and create the following › float the text to the right of image 3  › float the text to the left of image 4   Make sure you have a background color or image ›

 Understand the syntax of a CSS rule  Write CSS rules  Assign the same style rule to more than one element  Create style rules for link states  Understand how to create an external style sheet  Understand how to link to an external style sheet  Understand how to use internal style sheets  Understand how to import an external style sheet  Understand how to apply styles locally  Explore how to use comments in style rules

 Examples of applying style sheets ›  Formatting › › amples/localindex.html#c7 amples/localindex.html#c7

 The CSS1 specification was developed in 1996  CSS2 was released in 1998  CSS3 is on its way  CSSs provide the means to control and change presentation of HTML documents  CSS is not technically HTML, but can be embedded in HTML documents  Style sheets allow you to impose a standard style on a whole document, or even a whole collection of documents  Style is specified for a tag by the values of its properties 

 There are three levels of style sheets Inline - specified for a specific occurrence of a tag and apply only to that tag – This is fine-grain style, which defeats the purpose of style sheets - uniform style Document-level style sheets - apply to the whole document in which they appear This is what happens when you modify xHTML in Dreamweaver using deign mode External style sheets - can be applied to any number of documents  When more than one style sheet applies to a specific tag in a document, the lowest level style sheet has precedence › In a sense, the browser searches for a style property spec, starting with inline, until it finds one (or there isn’t one) › /cascade.html#cascade /cascade.html#cascade

 Inline style sheets appear in the tag itself  Document-level style sheets appear in the head of the document  External style sheets are in separate files, potentially on any server on the Internet › Written as text files with the MIME type text/css

 Use to format XHTML documents  Separate Content from Format  Allows consistent “Look and Feel” to all web pages in a web site

 Selector {property:value; property:value}  Examples › h1 {color:red;background:yellow;} › h2 {color:white;background:black;} › p {color:blue;}

 Value can be inherit from parent › Color:inherit;  Value can be predefined › display:block;  Value can be Length › Must contain units (except 0) › font-size:12px  Vale can be a percentage (relative to parent) › font-size:80%; › font-size:2em;  Value can be a number (real or integer) › Line-height:2;  Value can be a URL › Background:url(image.gif);  Value can be a color › rgb( 0,0,255) › rgb(0%,0%,100%) << error in textbook! › #0000ff › blue

 Why?? › So that you remember  /* comments */  Cannot be nested › /* this /*doesn’t*/ work */

 A selector determines which elements will be formatted  A selector can contain up to 5 criteria (any combination) › The type or name of the element › The context in which the element is found › The class or id of an element › The pseudo-class of an element or a pseudo-element itself › Whether or not an element has certain attributes and values

 Simply type the element as the selector › h1 › p › div  Add { property:value;…}  You can group element with a comma › h1,h2,h3 {color:red}  You can use * for all elements › * {color:red}

 If your elements is labeled with id or class, it can be formatted via a selector  If you used class › ›.bigheader {property:value}  If you used id › › #firstheader { property :value}  Can be used with element name › h1.bigheader {color:red} › h1#firstheader {color:red}

 Selecting elements based on parent/child relationship between elements header paragraph BIG small div is ancestor of all the above elements h1 is child of div div is parent (ancestor) of h1 big is a sibling of small h1 is a sibling of p big is descendent of div and child of p

 To select an element based on the context (relationship) do the following  For a any descendant element › Ancestor descendant {…} › Div.class p {color:red}  For only the child of a parent element (only some browsers) › Ancestor > descendent {…} › Div#label > p {color:red}

 To select elements that are the first child of a parent element › div p:first-child {color-red}  To select element based on siblings › div p+p {color:red}

 State means visited, mouse is over link.. etc › a:link {color:red} › a:visted{color:blue} › a:focus{color:yellow} › a:hover{color:green} › a:active{color:white}

 You can select just the first letter or first line of an element to be formatted  h1:first-letter {color:red}  p:first-line {color:blue}  Does not work with all browsers

element[attribute]{…} Or element[attribute=“value”] {…} (must have) Or element[attribute~=“value”]{…} (can have) Or element[attribute|=“value”]{…} (must have begin with “value-”) Does not work in Internet Explorer

 You can combine any of the previous techniques  First you define context  Then the element  Then class or id  Next pseudo-class or pseudo-element  Div.works p em:firstletter{color:red}

 Create a new text doc  Define rules  Save as “anyname.css  File must be “text only”  In Dreamweaver › File>New>”CSS Style Sheets” › then select one of the already begun style sheets

 In head section › › url.css is the location and filename of your external CSS style sheets

 Internal style sheet will only effect the one web page (not efficient)  In head section selector{property:value} ….

 Used with internal style sheet commands “external.css”; selector{property:value} ….

 Use style attribute in the element you wish to format (really not efficient)  Will only effect that occurrence of the element  Example ›

 Based on 1. Inheritance Style attribute may be inherited from parent element 2. Specificity The more specific the selector the stronger the rule ID is the most specific selector 3. Location The later the rule the stronger it is 4. Declaration !important added to end of rule amples/cssblocks/specificity.html p {color:red} p.group {color:blue} p#one {color:green} p#one {color:magenta }

 With so many ways to apply style what happens when there is more than one rule for a an element › Locally applied rules take precedence › Internal style rules before imported style rules › Order of the rules in a style sheet  Tip of the day ›