MadCap Flare – Controlling Document Look and Feel with CSS

Slides:



Advertisements
Similar presentations
Mike Hamilton V.P. Product Management MadCap Software Cascading Style Sheets (Part 3): Images and Text.
Advertisements

Topic Based Authoring: (Part 1)
Publishing Techniques: (Part 2)
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Cascading Style Sheets
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.
Intro To Cascading Style Sheets By Mario Yannakakis.
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: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
CSS Digital Media: Communication and design 2007.
Cascading Style Sheets
Today CSS HTML A project.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Introduction to CSS. What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML.
Adding styles. Three alternatives HIT151 Web 'n' Net Web Page Basics /*stylesheet*/ h1,h2,h3 { font-family: verdana, arial, 'sans serif'; } p,table,li.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
HyperText Markup Language (HTML) Uses plain text to add markup instructions to a file. If you can't produce it with a standard keyboard, it can't go into.
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.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
1 Pengantar Teknologi Internet W03: 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.
Chapter 8 Creating Style Sheets.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
Tutorial 2: Formatting Text. Objectives Session 2.1 – Learn the functions of the Common toolbar – Change the size of text – Discern which fonts to use.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Mike Hamilton V.P. Product Management MadCap Software Cascading Style Sheets (Part 2): Fonts and Beyond.
Chapter 3 Working with Text and Cascading Style Sheets.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
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.
Mike Hamilton V.P. Product Management MadCap Software CasCading Style Sheets (CSS) An introduction and 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,
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Chapter 3 Working with Text and Cascading Style Sheets.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Using Styles and Style Sheets for Design
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Cascading Style Sheet (CSS)
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.
CO1552 – Web Application Development Cascading Style Sheets.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Text and Cascading Style Sheets.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Tutorial 3 Adding and Formatting Text with CSS Styles.
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,
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.
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.
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.
Style Sheets.
The Internet 10/11/11 Fonts and Colors
CSS: Cascading Style Sheets
Chapter 6 Cascading Style Sheets™ (CSS)
IS 360 Declaring CSS Styles
Unit Objectives Create a new page Import text Set text properties
Using Cascading Style Sheets Module B: CSS Structure
Cascading Style Sheets (CSS)
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
The Internet 10/13/11 The Box Model
Working with Text and Cascading Style Sheets
Cascading Style Sheets
Presentation transcript:

MadCap Flare – Controlling Document Look and Feel with CSS Mike Hamilton V.P. Product Management MadCap Software mhamilton@madcapsoftware.com

Slides Slides are available on Mike’s blog at: http://madcapsoftware2.wordpress.com

What are Cascading Stylesheets (CSS)? Agenda What are Cascading Stylesheets (CSS)? CSS Basics CSS Rules Inheritance Cascading Classes Spans and Divs Creating a Stylesheet in Flare Flare Stylesheet editor overview

Agenda Modifying styles Applying styles to content Applying a style sheet to topics Fonts and Font Families Font sizing Creating a style class

Cascading Stylesheets Introduction

What Are Cascading Stylesheets? A Cascading stylesheet (CSS) document is a simple text file. A CSS file contains a collection of style rules used to control the look and feel of documents. A CSS style rule has two parts, a Selector and a Declaration

Cascading Style Sheets (CSS) Style Rules Property Value H1 {font-weight: bold} Selector Declaration H1 {font-weight: bold; color:black; }

XHTML elements inherit style attributes <body> CSS Inheritance XHTML elements inherit style attributes <body> <p>Sample text</p> </body> body { font-family: Arial; }

HTML Page Structure Document (HTML) Head Title Body H1 Heading Paragraph 1 Paragraph 2 Title

Three CSS implementations Cascading Three CSS implementations External Linked to an unlimited number of files Embedded Affects only the elements in a specific file Inline Affects only the element applied to

Linked (external) style sheets Cascading Order of precedence Inline styles Embedded style sheets Linked (external) style sheets EXAMPLE: BASIC.HTM Go through the entire file and describe all of it – especially style sheets

Use the STYLE attribute <p>This is normal text</p> Inline CSS Use the STYLE attribute <p>This is normal text</p> <p style=“font-weight: bold”>This is bold text</p> Creates a unified look between all of your documents Provides a very easy way to change the look of several documents at once (templates) You can define characteristics for specific tags, the a subset of items with a specific tag, or all items in a “class” External vs. Embedded Embedded applies only to the current page External (“linked”) applies to all pages that are linked to it The examples in this talk use embedded so we can stay in one file Values that can be affected by a style sheet: Paragraph-level (margins, padding, border) Character-level (font, color, background color, position) Some of the attributes can be either character or paragraph level.

Embedded CSS Added to the <HEAD> area of file Use <STYLE> element <HEAD> <TITLE>New Topic1</TITLE> <STYLE>H1{font-weight:bold}</STYLE> </HEAD>

External CSS The <LINK> element is used to attach a CSS document to an HTML document <LINK REL="StyleSheet” REF=”example.css"> Rel=related

CLASS attribute CLASS attribute can be used to create custom styles for a set of items on a page P { color:blue; margin-left:3px; } P.myclass { color:blue; margin-left:3px; } This is an easy way to affect a group of items (within a tag group or outside of tag groups) EXAMPLE: CLASS.HTM Add: P.SpecialPClass { font-weight : bold; font-size : 18pt; color : Maroon; } to style sheet Add: .GeneralClass { color : red; } to style sheet Add: CLASS="GeneralClass“ to H3 tag Add: <SPAN CLASS="GeneralClass"> around “Wednesday” in 1st paragraph Replace: <P>Dow Jones</P> with <DIV ID="DowJones"> <P CLASS="SpecialPClass">Dow Jones</P> </DIV> Show: New York – H3 Wednesday – SPAN Dow Jones - DIV

CLASS attribute Class Syntax: In a style sheet: P.myclass { color:blue; margin-left:3px; } In a page: <P CLASS=“myclass”>Text</P> This is an easy way to affect a group of items (within a tag group or outside of tag groups) EXAMPLE: CLASS.HTM Add: P.SpecialPClass { font-weight : bold; font-size : 18pt; color : Maroon; } to style sheet Add: .GeneralClass { color : red; } to style sheet Add: CLASS="GeneralClass“ to H3 tag Add: <SPAN CLASS="GeneralClass"> around “Wednesday” in 1st paragraph Replace: <P>Dow Jones</P> with <DIV ID="DowJones"> <P CLASS="SpecialPClass">Dow Jones</P> </DIV> Show: New York – H3 Wednesday – SPAN Dow Jones - DIV

Spans Spans format text within an element such as a paragraph, list, or table Conceptually similar to character styles in MS Word/FrameMaker <p>This paragraph has a <span style="font-weight: bold”> boldfaced</span> word.</p> This paragraph has a boldfaced word.

Divs Divs allow for grouping many elements together <div class=“indent”> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p> </div>

Using Cascading Stylesheets in Flare

Creating a Stylesheet Select Project>Add Stylesheet

Creating a Stylesheet In the Template Folders section select Factory Templates. In the Templates section, select one of the CSS template files available. If necessary, select an alternate folder for storing your new stylesheet. In the File Name field, type a name for the stylesheet. Click Add. Click OK.

Modifying a Style Open a stylesheet. By default stylesheets are stored in the Resources folder in the Content Manager view. When the stylesheet editor opens you can work in either the Simplified or Advanced view. tour In the simple view, double click on the style you wish to edit. Select a tab. Select a style property to change. Click OK.

Select View> Style Window. The Styles window appears. Applying a Style Open a topic. Select or click inside the content to which you want to apply the style. Select View> Style Window. The Styles window appears. Click a style to apply. The style is applied to the selected content

Applying a Stylesheet to a Topic Open the topic that you want to link to the stylesheet. Select Tools>Stylesheet Links. The Stylesheet Links dialog box appears.

Applying a Stylesheet to a Topic Select a stylesheet. Click . The stylesheet is added to the list on the left. Click OK. The stylesheet is applied to the topic.

Font Family What is a Font Family? A list of alternate fonts for styles used in your project Why are Font Families important? Many fonts on your authoring workstation may not be available on the end users’ If you use a font in your Help system that does not exist on the users’ workstation, then the browsers pick what font to use! Font sets allow you to define a list of alternate fonts for those used in the style sheets referenced by your topics. The browser or display device will attempt to use the primary font in the font set. If it can’t find the primary font on the users system, then it will try to use the other fonts in the font set in the order they are listed. All operating systems have a unique set of system fonts and font names. Many of the fonts on your authoring workstation may not be available on the users systems. Depending on your knowledge of your users and their system configurations, you will determine which font to define as the primary font, and how many alternatives you need to provide. In this example, we will create a font set that uses a Windows system font as the primary, but also calls a Macintosh system font and a generic font type for other operating systems.

Font Family Guidelines Define primary font Define secondary fonts for other operating systems (UNIX, Macintosh, etc.) Order is critical – list is hierarchical Note: Font sets are saved with a project  

Font Family Fonts Common to an OS Microsoft Windows Macintosh Times Arial Comic Sans MS Courier New Marlette Symbol Times New Roman Wingdings Microsoft Windows Times Courier Helvetica Symbol Chicago New York Geneva Monaco Palatino Macintosh These are lists of standard fonts that should be available on all Windows and Mac operating systems

Recommended Font Families Font Family Recommended Font Families Arial, Helvetica, Sans-serif Verdana, Arial, Helvetica, Sans-serif Times New Roman, Times, Serif Courier New, Courier, Mono

Creating a Font Family in Flare Demo Creating a Font Family in Flare

Font Sizing There are two ways to define font sizes in an HTML environment Fixed Font Sizing Relative Font Sizing

Font Sizing Fixed Font Sizing Fixed Font Sizing defines the size of fonts using absolute units such as points (pt), picas (pc), inches (in), centimeters (cm), etc. Because of the differences in how various types of computers display content, Fixed Font Sizing will ALWAYS cause fonts to display smaller on some systems (like the Macintosh) Tips: Various operating systems display fixed text sizes very differently. The 10 pt text that looks good on your desktop machine will require a magnifying glass to read on a Macintosh. This is due to differences in how operating systems render fixed size fonts. Fixed size fonts will always render differently on different platforms. This is due to different operating systems having different standards for the default points per inch (ppi).

Font Sizing Relative Font Sizing Relative Font Sizing defines the size of fonts using relative units such as percentages (%), the em unit (em), numerical values (1-7), and descriptive values (xx-small - xx-large), etc. Relative sizes refer to the font size of the parent element. This allows fonts to scale appropriately to different resolutions, browsers or platforms

Relative Font Size Guidelines Font Sizing Relative Font Size Guidelines Define the size for the normal style as 100% to provide consistent looking, legible text on any platform Define heading styles as a percentage of the normal text – e.g. Heading 1=120%, Heading 2=115%, etc. Defining the size info for the normal style as 100% will force the browser or display device to render normal text in the browsers default text size. You can then define various heading sizes as a percentage of the normal text – e.g. 115%.   Since individual browsers are written to a particular operating systems, they already take the differing ppi standards into consideration. Using the default browser text size (or a percentage of the default) should provide consistent looking, legible text on any platform.

Setting Relative Font Sizes Font Sizing Demo Setting Relative Font Sizes in Flare

Creating a Style Class Open a stylesheet. If the Stylesheet Editor opens to the Simplified view, click Advanced View. Select the p style. Click Add Class in the Stylesheet Editor toolbar. The New Style dialog box appears. Type a name for the style.

Creating a Style Class Click Create Style. The Create Style dialog box appears. In the Name field, type a name for the new style without using spaces.

Creating a Style Class If you do not want to include a style property in the new style, click the check box next to the value to remove the checkmark. If you want the new style to be applied to the selected content, select Create style and update the source element. If you do not want the new style to be applied to the selected content, select Create style without updating the source element. Click OK. The new style is added to the stylesheet.

Auto-Numbering Auto-Numbering can be used to allow for automated figure or table numbers, for government style paragraph numbering, or for automatically generating chapter numbers Create a custom style class Add auto-numbering to the style class Use the new style class in the Master Page Link Update the content master page to use auto-numbering to automatically add chapter numbers to every page.

Cross-References Cross-references allow for an extremely elegant single-source handling of linking Controlled by CSS Can look like standard hyperlinks for online publishing Converted to proper page number references when going to print Link

Suggested Reading List Watch all of the built in Flare tutorial videos. Read as much of the online help overview information as I could handle. Build a couple or three test projects to get a feel for what is going on. Coming from RoboHelp, get a copy of Scott's great book.   MadCap Flare for RoboHelp Users by Scott DeLoach ISBN-13: 978-0615141459  

Suggested Reading List HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide) by Elizabeth Castro ISBN-13: 978-0-321-43084-7 Technical Writing 101: A Real-World Guide to Planning and Writing Technical Documentation by Alan S. Pringle and Sarah O'Keefe ISBN-13: 978-0970473325 CSS: The Definitive Guide, Second Edition by Eric Meyer ISBN-13: 978-0596527334 DHTML and CSS for the World Wide Web, Third Edition (Visual Quickstart Guide) by Jason Teague ISBN-13: 978-0-201-73084-5

Questions?