1 Using Cascading Stylesheets (CSS) with FOCUS-Generated HTML A presentation for NORCAL IBUG June 2, 2000 Jon Gibbens –

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.
Cascading Style Sheets
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Introduction to CSS.
กระบวนวิชา 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.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
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.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
HCI 201 Week 6 Client Side Image Maps Introduction to CSS.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
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.
Controlling Page Style: Cascading Style Sheets (CSS) References: 1.Wang, P.S & Katila, S. (2004). A Introduction to Web Design and Programming. CA: Thomson.
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
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,
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
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.
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: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Using Cascading Style Sheet As you create more web pages, you may wish to impose a consistent look for all of your web pages or for group of related pages.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
XHTML/CSS Week 3. This Week  Quiz to revise last week (XHTML and DW)  CSS - Part 2  Using HTML Tables.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
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.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
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.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
Cascading Style Sheets
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
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.
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,
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
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.
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.
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.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
CSS Cascading Style Sheets *referenced from
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
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.
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.
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…
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
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.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

1 Using Cascading Stylesheets (CSS) with FOCUS-Generated HTML A presentation for NORCAL IBUG June 2, 2000 Jon Gibbens –

2 Outline n CSS intro n What’s in a Stylesheet? n How to use a Stylesheet? (Embedded Stylesheets, Linked Stylesheets, Elements of a Stylesheet) n FOCUS code to create HTML n Example - Take a mainframe report & make it less ‘mainframey’ n Software & Links n Q & A

3 CSS Intro - What are StyleSheets? What Can They Do? n Separate Style/Layout from Content (art people from writers) n Change the visual appearance of a web document n Fonts, Font Sizes, Headings, Footings, Tables n Allow for multiple ‘looks’ for the same HTML code (ie..a web browser stylesheet vs a printer stylesheet) n ‘Cascading’ refers to the ability to have multiple stylesheets applied to same HTML page n ‘Cascading’ also refers to how conflicts are resolved when stylesheets refer to the same property.

4 What goes inside a Stylesheet?? n Rules - Rules on how to display something n Example rule(s): H1 { text-align: center } P { color: red; font-family: sans-serif } n Consists of a selector and a declaration n Selector is the HTML tag that the stylesheet rule will be attached to (ie.. H1, P, TABLE,etc) n Declaration is what the style actually is, and what to do with it.

5 How to use a Stylesheet? n Stylesheets can be: n Embedded in a page n Linked to in a page n Imported into a page n Added inline in the code n We will cover Embedding and Linking in this talk n Importing and Inline stylesheets are not implemented in all browsers, or support is buggy!!

6 Embedding a Stylesheet n Embedded in HTML code inside HEAD tag n Example of inline stylesheet Sample Report <!-- H1 {text-align: center, font-style: italic} --> n Comment Tag used to shield stylesheet from browsers that can’t use it.

7 Linking to a Stylesheet n Ideal for using same stylesheet with multiple pages n Embedded in HTML code inside HEAD tag n Example of a linked stylesheet Sample Report n Create external file called style.css which contains stylesheet code

8 Sample elements of a stylesheet (Fonts, Colors, Spacing) n Fonts {font-family: monospace} {font: Ariel} {font: Courier, font-size: 15pt} n Colors { color: blue } { background : green } n Spacing {text-align: center} {text-indent: 10cm} or {text-indent:20%}

9 Using FOCUS to create HTML n General guidelines n Pre-allocate file with MOD access (so can concatenate data to it) n At end of your TABLE FILE section, put the following lines ON TABLE HOLD AS FORMAT HTML (which creates fully-formed HTML document) or ON TABLE HOLD AS FORMAT HTMTABLE (which creates just a HTML table) n This will create a HTML report

10 FOCUS code to create HTML -SET &SETUPSTRING=“ FOCUS Report - Sample FOCUS Report ”; -WRITE WIGDIST1 &SETUPSTRING TABLE FILE WIDGETS SUM DIST_COUNT AS 'DIST,COUNT’ N_DIST_CNT NOPRINT PCT.N_DIST_CNT AS 'DIST,COUNT,%' DIST_AMOUNT AS 'DIST,AMOUNT' N_DIST_AMT NOPRINT PCT.N_DIST_AMT AS 'DIST,AMOUNT,%' COLUMN-TOTAL BY DISTI6YYM AS 'DIST,YYM’ BY STATE BY PRODWEIGHT NOPRINT BY PRODTYPE AS 'PRODUCT,ROLLUP' ON PRODTYPE RECOMPUTE AS '*TOTAL' ON TABLE HOLD AS WIGDIST1 FORMAT HTMTABLE ON TABLE SET LINES 9999 END -SET &ENDSTRING=‘ Contains confidential information ’; -WRITE WIGDIST1 &ENDSTRING Important

11 Example: Take a mainframe report and make it less ‘mainframey’ n Change Header font,font size & color n Change table font and border settings n Change footer font & alignment

12 CSS Stylesheet to accomplish this (save as style1.css) H1 { font-family : Haettenschweiler; color : Maroon; font-size: xx-large; } TABLE, TR, TD { border-color : Olive; font-family : Arial; } P { background-color : Yellow; text-align : center; } Change font,color & size Change color & font Change color and alignment

13 2 Techniques to ‘apply’ this stylesheet 1. Embed in FOCUS code..ie: -SET &SETUPSTRING=“ FOCUS Report - - <!-- H1 {font-family : Haettenschweiler; etc etc etc - --> - Sample FOCUS Report ”; 2. Upload to web server and then link to it..ie SET &SETUPSTRING=“ FOCUS Report

14 What you get after you apply the stylesheet (Before & After)

15 Browser Compatibility Issues n In short - newest browsers (IE 5+, Netscape 4+ and latest version of Opera) have the best support n Caveat: They don’t all support ALL the features n Best bet is to implement in an intranet environment where browser versions are locked down, then write your stylesheet code accordingly. n Use the Master List (URL at end) n Can do some trickery with Javascript to display the appropriate stylesheet for a specific browser (but that’s another presentation)

16 StyleSheet Editing Software n TopStyle Lite & Eval versions available. Commercial version: $50 n DreamWeaver day eval version available, Cost: $250 n Windows Notepad/Wordpad or Unix vi/pico editor - Free

17 Web Links/Resources n W3C.org - n Webreview.com n The Master List Grid which lists all of the CSS properties by browsers that support them

18 Q & A