Mike Hamilton V.P. Product Management MadCap Software Cascading Style Sheets (Part 2): Fonts and Beyond.

Slides:



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

MadCap Flare – Controlling Document Look and Feel with CSS
CSS Digital Media: Communication and design 2007.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Chapter 6 Web Typography
CS4370/6370 Web Development Cascading Style Sheets (CSS)
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Web Design & Development Cascading Style Sheets (CSS)
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Tutorial 3 Working with Cascading Style Sheets. XP Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external.
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
Mike Hamilton V.P. Product Management MadCap Software CasCading Style Sheets (CSS) An introduction and overview.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
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.
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
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.
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)
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
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.
Mike Hamilton V.P. Product Evangelism MadCap Software Content Authoring for Responsive Design.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Tutorial 3 Working with Cascading Style Sheets (CSS)
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.
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.
PRESENTED BY Content Authoring for Responsive Design Mike Hamilton V.P. Product Evangelism at MadCap Software
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Files you will need ... Black Goose Bistro Summer Menu
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Lesson 15: Cascading Style Sheets. Objectives Identify ways to apply Web page formatting with Cascading Style Sheets (CSS1 and CSS2) using various methods.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
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,
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
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.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
CSS: Cascading Style Sheets Part II. Style Syntax.
CSS Cascading Style Sheets *referenced from
Basic Webpage Design Cascading Style Sheet (CSS).
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
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.
The Box Model in CSS Web Design – Sec 4-8
The Box Model in CSS Web Design – Sec 4-8
Introduction to Cascading Style Sheets (CSS)
Presentation transcript:

Mike Hamilton V.P. Product Management MadCap Software Cascading Style Sheets (Part 2): Fonts and Beyond

Agenda Short CSS review Fonts and Font Families Font Sizing The “Box” model Box model adjustments and controls

Presenter Information Mike Hamilton –MadCap V.P. of Product Management Mike Hamilton is the Vice President of Product Management at MadCap Software where he is working on the next generation authoring tool, Flare. Before joining MadCap Software, he was the Product Manager for the RoboHelp product line since the days of Blue Sky Software, eHelp, and Macromedia. Mr. Hamilton joined the RoboHelp team in the mid ’90s as a founding member of the Training Solutions Program team, where he co-authored the certified training materials supporting the RoboHelp family. Mike has over 20 years of experience in training, technical communication, multimedia development, and software development at several organizations including Macromedia, eHelp/Blue Sky Software, Cymer, a leading supplier of laser illumination sources in the semiconductor industry, National Steel and Shipbuilding, and the US Navy.

We also have with us… Sharon Burton/Neal Pozner –MadCap Product manager/Tech Support Answering your questions during the webinar –They’ll do their best to answer them Type questions in the Question and Answer area of the GoToWebinar bar

Short CSS Review

What Are Cascading Style Sheets? A Cascading style sheet (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 SelectorDeclaration ValueProperty H1 {font-weight: bold} H1 {font-weight: bold; color: black; }

CLASS attribute Class Syntax: –In a style sheet: P.myclass { color:blue; margin- left:3px; } –In a page: Text

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

Fonts and Font Families

Font Family What is a Font Family? A list of primary and alternate fonts for styles used in your document 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 document that does not exist on the users ’ workstation, then the browsers pick what font to use!

Font Family Font Family Guidelines Define primary font Define secondary fonts for other operating systems (UNIX, Macintosh, etc.) Define generic font family Order is critical – list is hierarchical

Font Family Fonts Common to an OS 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

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

Font Family Example Font Families body { font-family: arial, helvetica, sans-serif } p.code { font-family: “courier new”, courier, mono} Summary: Take control of the fonts used on your content and don’t let browsers make uncontrolled substitutions

Font Metrics

A h F g x Font Metrics The values determining font size: Descender Ascender X-height Baseline Font Size

One Size Does Not Fit All “It is a far, far better thing that I do, than I have ever done; it is a far, far better rest that I go to than I have ever known.“ Times New Roman 32pt Garamond 32pt

It’s All in the X-height AhFgx Times New Roman Garamond

Font Sizing Result: Font size determines the physical space that text will require and does not directly correlate to readability or usability No one font size is “ideal” for body text or headings, but is completely dependant on the font in use

Font Sizing

There are two (and a half*) ways to define font sizes in CSS –Fixed Font Sizing –Physical Font Sizing (the half*) –Relative Font Sizing *Half because Mike made it up

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)

Font Sizing Physical Font Sizing Physical Font Sizing defines the size of fonts using pixels (px) The size of pixels (or “picture elements”) is hardware dependent on your monitor, its size, and its resolution The size of pixels on a 17” laptop at 1920x1200 resolution is very small while the pixels on a 14” monitor at 1024x768 would be quite large

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

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.

Font Sizing Relative Font Sizing - CAUTION Watch out for the “fun-house mirror” factor that can occur when relative font sizes inherit from other relative font sizes This can cause text to shrink or expand very quickly

Fixed Font Sizing body {font-size: 8pt; font-family: Verdana, Arial,Helvetica, Sans-Serif;} h1 {font-size: 12pt;} div {margin-left: 10pt; font-size: 10pt;} li {font-size: 10pt;} p {font-size: 10pt;} Heading 1 Text A normal paragraph List item 1 List item 2 Supporting paragraph List item 3 Closing paragraph

Relative Font Sizing body {font-size:.8em; font-family: Verdana, Arial,Helvetica, Sans-Serif;} h1 {font-size: 1.2em;} div {margin-left: 10pt; font-size:.8em;} li {font-size:.8em;} p {font-size:.8em;} Heading 1 Text A normal paragraph List item 1 List item 2 Supporting paragraph List item 3 Closing paragraph

The Box Model

This page contains three elements Each element has in invisible box around it Heading 1 Text This is paragraph 1 This is paragraph 2

The Box Model There are three primary attributes to the box model –Border –Margin –Padding Each can be set in total, or by top, bottom, right, or left Heading 1 Text This is paragraph 1 This is paragraph 2

Common Box Model Adjustments

To add an indent add or increase margin-left To increase the space above paragraphs or elements add or increase margin-top To increase the space below paragraphs or elements add or increase margin-bottom

Common Box Model Adjustments Example: To create a paragraph with lines applied above and below. p.lines { border-bottom-color: #000000; border-bottom-style: Solid; border-bottom-width: 1px; border-top-color: #000000; border-top-style: Solid; border-top-width: 1px; }

Common Box Model Adjustments p.lines { margin-bottom: 0.8em; margin-left:.1em; margin-top: 1.7em; padding-left: 0.8em; padding-right: 0.8em; padding-bottom: 0.5em; padding-top: 0.5em; border-bottom-color: #000000; border-bottom-style: Solid; border-bottom-width: 1px; border-top-color: #000000; border-top-style: Solid; border-top-width: 1px; }

Common Box Model Adjustments

p.lines { margin-bottom: 0.8em; margin-left:.1em; margin-top: 1.7em; padding-left: 0.8em; padding-right: 0.8em; padding-bottom: 0.5em; padding-top: 0.5em; border-bottom-color: #000000; border-bottom-style: Solid; border-bottom-width: 1px; border-top-color: #000000; border-top-style: Solid; border-top-width: 1px; line-height: 1.2em; }

Common Box Model Adjustments

Additional Adjustments To justify text right, left, or center use the text-align attribute If you want to indent just the first line of a paragraph then use text-indent

Fonts and Beyond Summary Use Font Families to control any font substitutions the browser may perform There is no magic font size that should be used in all cases Relative font sizing is preferable but takes practice Remember the Box Model when you need to adjust text/element spacing Margin and Padding will be used a lot!

Suggested Reading List HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide) by Elizabeth Castro ISBN-13: CSS To The Point by Scott DeLoach ISBN-13: Cascading Style Sheets: Designing for the Web (3rd Edition) (Paperback) by Hakon Wium Lie and Bert Bos ISBN-13: CSS: The Definitive Guide, Third Edition by Eric Meyer ISBN-13:

Questions? Mike Hamilton V.P. Product Management MadCap Software

Thank You! Mike Hamilton V.P. Product Management MadCap Software