CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

CSS CSS stands for Cascading Style Sheets Styles define how to display HTML elements External Style Sheets can save a lot of work External Style Sheets.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Technologies for web publishing Ing. Václav Freylich Lecture 6.
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Web Design & Development Cascading Style Sheets (CSS)
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
SM5312 week 6: basic CSS syntax1 An Introduction to Cascading Style Sheets Basic CSS Syntax Nick Foxall.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
4.01 Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
 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.
HTML - Quiz #2 Attendance CODE:
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSCI N241: Fundamentals of Web Design Copyright ©2006  Department of Computer & Information Science Using the Box Model, & Elements.
The Characteristics of CSS
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
CSS in XHTML continued Please use speaker notes for additional information!
Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit E Formatting with Cascading Style Sheets.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
XHTML/CSS Week 3. This Week  Quiz to revise last week (XHTML and DW)  CSS - Part 2  Using HTML Tables.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
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.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
CO1552 – Web Application Development Cascading Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
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:
Files you will need ... Black Goose Bistro Summer Menu
Fonts The following CSS properties will be described: 1.Font-family 2.Font-style 3.Font-variant 4.Font-weight 5.Font-size 6.Font.
XHTML and CSS. The Browser The browser is not print!
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
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.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
CSS with XHTML Please use speaker notes for additional information!
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
CSS Cascading Style Sheets *referenced from
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
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.
>> Introduction to CSS
Presentation transcript:

CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and CIS 137

Before We Begin… September 14, 2010 CSS Class & ID Files by Professor Al Fichera 2 To establish the font face, size, and color to be used on this sample page I created the following Style Rule for p. p { font-family: Verdana, Geneva, sans-serif; font-size: 1.1em; line-height: 1.5em; color: #000000; }

Overview Class Using CSS Styles, you can apply a Class or ID attribute to HTML elements on the page. September 14, CSS Class & ID Files by Professor Al Fichera

Overview Class Files A Class attribute assigns a class name to an element. So what do I have to do to make a "Class" file? Create a selector with a period (.) in front in the Style Block in the Head. Examples coming in the next few slides. September 14, CSS Class & ID Files by Professor Al Fichera

Applied Class A Class selector lets you assign styles to elements that are included within a particular class. For instance, apply different style properties to P elements that contain a class="quote" attribute. So you can eliminate or change some of the properties from a element rule that's working. September 14, CSS Class & ID Files by Professor Al Fichera

Class Files = Multiple Use on a Page In the following class file can be added to a blockquote tag or a p tag..quote { font-family: 'times new roman', times, serif; font-weight: normal; font-style: italic; color: #000000; background-color: #DDDDDD; padding: 5px; } September 14, 2010 CSS Class & ID Files by Professor Al Fichera 6

Class Selectors for a Logo Area Here's another class selector idea that can add a special look to the top of any document, if inside a div : div.pagetop { font-family: Verdana, Geneva, sans-serif; font-size: 3em; font-weight: bold; line-height: 2.5em; color: #FFFFFF; background-image: url(denim.jpg); text-align: center; padding: 4px; margin: 2px; border: double 6px #000000; } Used in this fashion. September 14, CSS Class & ID Files by Professor Al Fichera

Class Selectors for a Page Heading It might fit your design for the page by having a line of text introducing the content of the page right under the page top logo, if inside a div. Try this one for size: div.pageheading { font-family: Arial, Helvetica, sans-serif; font-size: 1.2em; font-weight: bold; font-variant: small-caps; color: #000066; letter-spacing:.2em; margin-top: -3px; margin-left: 20px; } Used in this fashion. September 14, CSS Class & ID Files by Professor Al Fichera

Firefox and MSIE are Similar Here is the results of the previous three class selectors. div.pagetop div.pageheading p.quote September 14, 2010 CSS Class & ID Files by Professor Al Fichera 9

Pseudo-Class for a Drop Capital A pseudo-class rule can be used any time you wish to augment a CSS rule that you created or any HTML element you wish to change. The pseudo-class file adds the additional condition when and how the effect should take place. In the next slide we will build a " Drop Cap " using the pseudo-element called " first-letter". September 14, CSS Class & ID Files by Professor Al Fichera

Pseudo-Class for a Drop Capital Here's a pseudo-class selector idea that adds a special Drop Capital to the first letter of the paragraph: p.firstparagraph:first-letter { font-size: 200%; font-weight: bold; line-height: 1.5em; color: #FF0000; width: 1em; float: left; padding: 4px; margin: 2px; border: solid thin #000000; } Used in this fashion. September 14, CSS Class & ID Files by Professor Al Fichera

Firefox and MSIE on Drop Capitals Firefox, a little more refined text, MSIE, a bit of bang on the head text. Zoom level set the same on both Browsers. Personally speaking, MSIE lined up the Drop Cap Box better than Firefox, however, Firefox lined up the text better with the line. September 14, CSS Class & ID Files by Professor Al Fichera

Overview ID An ID attributes assigns a unique name to an element. ID values must be unique and should not be repeated in the same document. September 14, CSS Class & ID Files by Professor Al Fichera

The ID Selector The ID selector uses a pound sign ( # ) flag character instead of the period used in a Class selector. You can apply the ID name to the appropriate element in the document, in most examples that would be the element. September 14, CSS Class & ID Files by Professor Al Fichera

Combining Class and ID Files Here is an idea that might be worth something, mix the two to create a third version that could be used in the site. Start with this simple Class element to create a really bold line of text that's easier on the eyes to read:.bolder { font-weight: bolder; letter-spacing:.1em; } September 14, CSS Class & ID Files by Professor Al Fichera

Combining Class and ID Files Add this ID element selector for a pulled quote box: #box { font-family: Arial, Helvetica, sans-serif; font-size: 0.85em; line-height: 1.3em; color: #000000; background-color: #BCD1F0; width:1.25in; float: left; padding: 5px; margin: 10px; border: solid 2px red; } Text here… Used in this fashion. September 14, CSS Class & ID Files by Professor Al Fichera

Again as you can see from these examples, Firefox again has a more refined look and feel, and more of what I had in mind. Knowing that, I'd have to adjust my code to get MSIE a little closer to what I expect the page to look like. Firefox and MSIE on the Pulled Box September 14, CSS Class & ID Files by Professor Al Fichera

Class File Good Ideas Department Perhaps you might have an idea to make certain elements of your Web page take on a different look from time to time. Try something like these:.it { font-style: italic; color: #0000FF; }.highlight { color: #990000; background-color: #FFFF99; } September 14, CSS Class & ID Files by Professor Al Fichera

Apply the Class File to a Span Tag Use them in your document in this fashion: consectetuer Vestibulum odio. The span tag was used because these snippets of code will be used inside a paragraph, however we don't wish to color the whole paragraph, just a small portion. The next slide is an example of all the Class and ID files used in this lecture. (And, obviously shown with Firefox.) September 14, CSS Class & ID Files by Professor Al Fichera

Results of a Few Class and ID Rules September 14, CSS Class & ID Files by Professor Al Fichera