SlideShare a Scribd company logo
1 of 31
GOING ONLINE WITH STYLES:
AN INTRODUCTION TO CSS
Neil Perlin
Hyper/Word Services
2015
Go ing O nline With Style
An Intro to CSS
Who Am I?
Neil Perlin - Hyper/Word Services.
– Internationally recognized content consultant.
– Help clients create effective, efficient, flexible
content in anything from hard-copy to mobile.
– Certified – RoboHelp, Flare, Mimic, Viziapps.
– Working in CSS since 1999-ish.
– Train and consult on CSS for Flare and RoboHelp.
Contents
Intro to CSS
Some CSS Basics
Why This Matters
Some Best Practices
Sources of Information
Intro to CSS
What’s a Style?
A named set of properties for a type of content.
– Like H1 style set as 16pt, Navy, Arial, Bold.
» You must apply a style, although your authoring
tool does that for you in certain cases, such as
applying h1 and p for new topics.
» But if you then have to change a property, you
need only do so once, for the style – the change
applies everywhere you applied the style.
What’s a Style Sheet?
A file that contains all (ideally) styles and their
properties for all topics in a project.
Called a cascading style sheet, or “CSS”.
– Like Word’s styles conceptually but:
» An open standard rather than MS-proprietary.
» Separate from the content template rather than a
part of it.
“Cascading” – Definition 1
“Cascade” of three ways to apply styles.
– External – CSS file to which each topic links.
» Highest efficiency, lowest priority.
– Embedded – Stored in topic to which styles apply.
» Middle efficiency, middle priority.
– Inline/Local – Formatting via text formatting
toolbar.
» Lowest efficiency, highest priority.
Definition 1 Example
“Cascading” – Definition 2
“Child” styles inherit settings from their parent
styles.
– For example, if Normal style uses Arial and you add
a child style based on Normal, the child uses Arial.
– So the more properties you can define in a parent
style, the more efficient your CSS development.
“Cascading” Example
For example, the
styles under “p”
are child styles
(“sub-classes”)
of p.
Changing a
property of p changes that property in all the p
child styles.
A Terminology Issue
Note the presence of
the “body” style.
In HTML, “body” is
the top-level parent
style.
Changing a property of “body” changes that
property for all other styles in the CSS unless
you set those other styles specifically.
So, again, defining global styles at the different
parent levels can produce more efficient CSSs.
Why Use Styles and Style Sheets?
…instead of local formatting?
– Cleaner, simpler code – this:
<p>
– Versus this:
<p class=“abc” style=“margin-left: 12px; text-align:
left;”>
Why Use Styles and Style Sheets?
Plus:
– Efficiency – Style changes apply across the entire
project.
– Consistency – If all authors use one CSS (correctly),
everyone’s outputs standardize.
– Extensibility – Styles may form the basis for other
processing, like Word file import into a HAT (help
authoring tool).
– The future…
How To Use Styles and CSSs
Create your CSS.
Apply the CSS to all your topics.
– You can apply different CSSs to different topics in
the same project but this is rare.
Then apply styles from the CSS to types of text.
– H1 style to all level 1 heads, H2 to subheads, etc.
– Tedious, but your HAT applies basic styles – H1
and Normal – for you.
Some CSS
Basics
Style Rules
Structure of a style rule.
– Selector {property:value;}
» Where property: value is the “declaration block”
» Such as h2 {color: red;}
– Can apply multiple properties to multiple selectors
at once.
» h1, h2 {color: red;} or
» h2 {color: red; font-family: Verdana;} or
» h1, h2 {color: red; font-family: Verdana;}
Multi-Declaration Style Blocks
Multi declaration block styles often look like:
– Selector
{
property:value;
property:value;
}
– h2
{
color: red;
font-family: Verdana;
}
The Box Model
Ever wonder why you sometimes have to use
negative left indents to get list items or images
to align correctly?
» http://chimera.labs.oreilly.com/
Relative Size Units
We’re used to point-based sizes – 72pt = 1” –
from our print experience – familiar and simple.
But…
Problems With Points
Points being fixed, are fine for print output but
have two problems in online outputs:
– Text in pts can’t be resized by a browser user.
– Text in pts can’t be resized automatically by a
browser.
Instead, use:
– % – Based on the default size of normal on any
given browser – 100%.
– Em – Initially = the height of the capital M in each
browser’s font set. Now = a computed font-size
property for the style it’s based on – aka it varies.
Why Relative Sizes?
An image at an absolute
width in a too-narrow space.
– Note the horizontal scroll bar.
And at a relative width in that
same space.
– No horizontal scroll bar; the
50% width makes a browser
show the image at 50% of
the available space – “relative”.
– In effect, each browser handles
that formatting for you.
And Much More…
Multiple ways to specify colors.
Cool rounded box corners (under CSS3).
Ways to create unnumbered items in numbered
lists as a style.
Ability to add “user notification” (tips, notes,
etc.) icons as a style rather than by using a table.
Ability to insert horizontally aligned graphics
that automatically change to vertical alignment
as the screen narrows.
And so on…
CSS Levels
CSS3 is an extension of 2.
CSS3 is a modularized standard, so different
areas can move faster than others.
– But CSS2 syntax and commands are still valid.
Why This Matters
How does this affect tech comm? Two ways:
– General project control – again, this
<p> versus this <p class=“abc” style=“margin-
left: 12px; text-align: left;”>
– Responsive design.
Some Best
Practices
Some Best Practices…
At a minimum…
– Define your CSS before starting a project and then
DON’T MESS WITH IT!
» Unless you have to…
– Put all style code in the CSS, none in the topic.
– Don’t change de facto standards like link settings.
– KISS and consider maintainability – the !important
property saga.
– Stay out of the code.
– Document it.
Sources of
Information
Sources
Online – W3C at http://www.w3.org/Style/CSS/
Books:
– Cascading Style Sheets: Designing for the Web (3rd
Edition), Hakon Wium Lie, Bert Bos
Training:
– Public classes.
– Vendor classes, like MadCap’s CSS class.
– Other classes, like my RoboHelp CSS class.
Hyper/Word Services Offers…
Training • Consulting • Development
Flare • Flare CSS • Flare Single Sourcing
RoboHelp • RoboHelp CSS • RoboHelp
HTML5
ViziApps
Single sourcing • Structured authoring
Thank you... Questions?
978-657-5464
nperlin@nperlin.cnc.net
www.hyperword.com
Twitter: NeilEric

More Related Content

What's hot (17)

Css3
Css3Css3
Css3
 
Links and Navigation
Links and NavigationLinks and Navigation
Links and Navigation
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
Visualizing The Code
Visualizing The CodeVisualizing The Code
Visualizing The Code
 
Haml And Sass In 15 Minutes
Haml And Sass In 15 MinutesHaml And Sass In 15 Minutes
Haml And Sass In 15 Minutes
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
CSS Reset
CSS ResetCSS Reset
CSS Reset
 
CSS
CSSCSS
CSS
 
Css
CssCss
Css
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Class
ClassClass
Class
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSS
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 

Similar to Spectrum 2015 going online with style - an intro to css

Rh10 css presentation
Rh10 css presentationRh10 css presentation
Rh10 css presentationNeil Perlin
 
Rh10 css presentation
Rh10 css presentationRh10 css presentation
Rh10 css presentationNeil Perlin
 
Developing for the unknown lavacon
Developing for the unknown   lavaconDeveloping for the unknown   lavacon
Developing for the unknown lavaconNeil Perlin
 
Developing for the unknown lavacon
Developing for the unknown   lavaconDeveloping for the unknown   lavacon
Developing for the unknown lavaconNeil Perlin
 
Html and css easy steps
Html and css easy stepsHtml and css easy steps
Html and css easy stepsBiswa Ranjan
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS MethodologyZohar Arad
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5Taymoor Nazmy
 
Html Css
Html CssHtml Css
Html Csspumas26
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesHeather Rock
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentationJoeSeckelman
 
Css methods architecture
Css methods architectureCss methods architecture
Css methods architectureLasha Sumbadze
 
Design and CSS
Design and CSSDesign and CSS
Design and CSSnolly00
 

Similar to Spectrum 2015 going online with style - an intro to css (20)

Rh10 css presentation
Rh10 css presentationRh10 css presentation
Rh10 css presentation
 
Rh10 css presentation
Rh10 css presentationRh10 css presentation
Rh10 css presentation
 
Developing for the unknown lavacon
Developing for the unknown   lavaconDeveloping for the unknown   lavacon
Developing for the unknown lavacon
 
Developing for the unknown lavacon
Developing for the unknown   lavaconDeveloping for the unknown   lavacon
Developing for the unknown lavacon
 
Html css
Html cssHtml css
Html css
 
Html and css easy steps
Html and css easy stepsHtml and css easy steps
Html and css easy steps
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Class
ClassClass
Class
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5
 
Html Css
Html CssHtml Css
Html Css
 
CSS
CSSCSS
CSS
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 Slides
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Css methods architecture
Css methods architectureCss methods architecture
Css methods architecture
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Design and CSS
Design and CSSDesign and CSS
Design and CSS
 

More from Neil Perlin

Spectrum 16 pmc 16 - preparing legacy projects for responsive design
Spectrum 16   pmc 16 - preparing legacy projects for responsive designSpectrum 16   pmc 16 - preparing legacy projects for responsive design
Spectrum 16 pmc 16 - preparing legacy projects for responsive designNeil Perlin
 
Spectrum 16 pmc 16 - mobile and tech comm
Spectrum 16   pmc 16 - mobile and tech commSpectrum 16   pmc 16 - mobile and tech comm
Spectrum 16 pmc 16 - mobile and tech commNeil Perlin
 
Stc 2015 preparing legacy projects for responsive design - design issues
Stc 2015   preparing legacy projects for responsive design - design issuesStc 2015   preparing legacy projects for responsive design - design issues
Stc 2015 preparing legacy projects for responsive design - design issuesNeil Perlin
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issuesNeil Perlin
 
Spectrum 2015 responsive design
Spectrum 2015   responsive designSpectrum 2015   responsive design
Spectrum 2015 responsive designNeil Perlin
 
Lavacon 2014 responsive design in your hat
Lavacon 2014   responsive design in your hatLavacon 2014   responsive design in your hat
Lavacon 2014 responsive design in your hatNeil Perlin
 
Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Neil Perlin
 
Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Neil Perlin
 
Tc dojo presentation writing mobile documentation
Tc dojo presentation   writing mobile documentationTc dojo presentation   writing mobile documentation
Tc dojo presentation writing mobile documentationNeil Perlin
 
Integrating hat content into mobile app lavacon
Integrating hat content into mobile app   lavaconIntegrating hat content into mobile app   lavacon
Integrating hat content into mobile app lavaconNeil Perlin
 
Small steps to content strategy
Small steps to content strategySmall steps to content strategy
Small steps to content strategyNeil Perlin
 
Small steps to content strategy
Small steps to content strategySmall steps to content strategy
Small steps to content strategyNeil Perlin
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the maxNeil Perlin
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slidesNeil Perlin
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slidesNeil Perlin
 

More from Neil Perlin (15)

Spectrum 16 pmc 16 - preparing legacy projects for responsive design
Spectrum 16   pmc 16 - preparing legacy projects for responsive designSpectrum 16   pmc 16 - preparing legacy projects for responsive design
Spectrum 16 pmc 16 - preparing legacy projects for responsive design
 
Spectrum 16 pmc 16 - mobile and tech comm
Spectrum 16   pmc 16 - mobile and tech commSpectrum 16   pmc 16 - mobile and tech comm
Spectrum 16 pmc 16 - mobile and tech comm
 
Stc 2015 preparing legacy projects for responsive design - design issues
Stc 2015   preparing legacy projects for responsive design - design issuesStc 2015   preparing legacy projects for responsive design - design issues
Stc 2015 preparing legacy projects for responsive design - design issues
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
 
Spectrum 2015 responsive design
Spectrum 2015   responsive designSpectrum 2015   responsive design
Spectrum 2015 responsive design
 
Lavacon 2014 responsive design in your hat
Lavacon 2014   responsive design in your hatLavacon 2014   responsive design in your hat
Lavacon 2014 responsive design in your hat
 
Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...
 
Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...Overcoming design challenges in hat based multichannel publishing - stc summi...
Overcoming design challenges in hat based multichannel publishing - stc summi...
 
Tc dojo presentation writing mobile documentation
Tc dojo presentation   writing mobile documentationTc dojo presentation   writing mobile documentation
Tc dojo presentation writing mobile documentation
 
Integrating hat content into mobile app lavacon
Integrating hat content into mobile app   lavaconIntegrating hat content into mobile app   lavacon
Integrating hat content into mobile app lavacon
 
Small steps to content strategy
Small steps to content strategySmall steps to content strategy
Small steps to content strategy
 
Small steps to content strategy
Small steps to content strategySmall steps to content strategy
Small steps to content strategy
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the max
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slides
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slides
 

Recently uploaded

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Spectrum 2015 going online with style - an intro to css

  • 1. GOING ONLINE WITH STYLES: AN INTRODUCTION TO CSS Neil Perlin Hyper/Word Services 2015
  • 2. Go ing O nline With Style An Intro to CSS
  • 3. Who Am I? Neil Perlin - Hyper/Word Services. – Internationally recognized content consultant. – Help clients create effective, efficient, flexible content in anything from hard-copy to mobile. – Certified – RoboHelp, Flare, Mimic, Viziapps. – Working in CSS since 1999-ish. – Train and consult on CSS for Flare and RoboHelp.
  • 4. Contents Intro to CSS Some CSS Basics Why This Matters Some Best Practices Sources of Information
  • 6. What’s a Style? A named set of properties for a type of content. – Like H1 style set as 16pt, Navy, Arial, Bold. » You must apply a style, although your authoring tool does that for you in certain cases, such as applying h1 and p for new topics. » But if you then have to change a property, you need only do so once, for the style – the change applies everywhere you applied the style.
  • 7. What’s a Style Sheet? A file that contains all (ideally) styles and their properties for all topics in a project. Called a cascading style sheet, or “CSS”. – Like Word’s styles conceptually but: » An open standard rather than MS-proprietary. » Separate from the content template rather than a part of it.
  • 8. “Cascading” – Definition 1 “Cascade” of three ways to apply styles. – External – CSS file to which each topic links. » Highest efficiency, lowest priority. – Embedded – Stored in topic to which styles apply. » Middle efficiency, middle priority. – Inline/Local – Formatting via text formatting toolbar. » Lowest efficiency, highest priority.
  • 10. “Cascading” – Definition 2 “Child” styles inherit settings from their parent styles. – For example, if Normal style uses Arial and you add a child style based on Normal, the child uses Arial. – So the more properties you can define in a parent style, the more efficient your CSS development.
  • 11. “Cascading” Example For example, the styles under “p” are child styles (“sub-classes”) of p. Changing a property of p changes that property in all the p child styles.
  • 12. A Terminology Issue Note the presence of the “body” style. In HTML, “body” is the top-level parent style. Changing a property of “body” changes that property for all other styles in the CSS unless you set those other styles specifically. So, again, defining global styles at the different parent levels can produce more efficient CSSs.
  • 13. Why Use Styles and Style Sheets? …instead of local formatting? – Cleaner, simpler code – this: <p> – Versus this: <p class=“abc” style=“margin-left: 12px; text-align: left;”>
  • 14. Why Use Styles and Style Sheets? Plus: – Efficiency – Style changes apply across the entire project. – Consistency – If all authors use one CSS (correctly), everyone’s outputs standardize. – Extensibility – Styles may form the basis for other processing, like Word file import into a HAT (help authoring tool). – The future…
  • 15. How To Use Styles and CSSs Create your CSS. Apply the CSS to all your topics. – You can apply different CSSs to different topics in the same project but this is rare. Then apply styles from the CSS to types of text. – H1 style to all level 1 heads, H2 to subheads, etc. – Tedious, but your HAT applies basic styles – H1 and Normal – for you.
  • 17. Style Rules Structure of a style rule. – Selector {property:value;} » Where property: value is the “declaration block” » Such as h2 {color: red;} – Can apply multiple properties to multiple selectors at once. » h1, h2 {color: red;} or » h2 {color: red; font-family: Verdana;} or » h1, h2 {color: red; font-family: Verdana;}
  • 18. Multi-Declaration Style Blocks Multi declaration block styles often look like: – Selector { property:value; property:value; } – h2 { color: red; font-family: Verdana; }
  • 19. The Box Model Ever wonder why you sometimes have to use negative left indents to get list items or images to align correctly? » http://chimera.labs.oreilly.com/
  • 20. Relative Size Units We’re used to point-based sizes – 72pt = 1” – from our print experience – familiar and simple. But…
  • 21. Problems With Points Points being fixed, are fine for print output but have two problems in online outputs: – Text in pts can’t be resized by a browser user. – Text in pts can’t be resized automatically by a browser. Instead, use: – % – Based on the default size of normal on any given browser – 100%. – Em – Initially = the height of the capital M in each browser’s font set. Now = a computed font-size property for the style it’s based on – aka it varies.
  • 22. Why Relative Sizes? An image at an absolute width in a too-narrow space. – Note the horizontal scroll bar. And at a relative width in that same space. – No horizontal scroll bar; the 50% width makes a browser show the image at 50% of the available space – “relative”. – In effect, each browser handles that formatting for you.
  • 23. And Much More… Multiple ways to specify colors. Cool rounded box corners (under CSS3). Ways to create unnumbered items in numbered lists as a style. Ability to add “user notification” (tips, notes, etc.) icons as a style rather than by using a table. Ability to insert horizontally aligned graphics that automatically change to vertical alignment as the screen narrows. And so on…
  • 24. CSS Levels CSS3 is an extension of 2. CSS3 is a modularized standard, so different areas can move faster than others. – But CSS2 syntax and commands are still valid.
  • 25. Why This Matters How does this affect tech comm? Two ways: – General project control – again, this <p> versus this <p class=“abc” style=“margin- left: 12px; text-align: left;”> – Responsive design.
  • 27. Some Best Practices… At a minimum… – Define your CSS before starting a project and then DON’T MESS WITH IT! » Unless you have to… – Put all style code in the CSS, none in the topic. – Don’t change de facto standards like link settings. – KISS and consider maintainability – the !important property saga. – Stay out of the code. – Document it.
  • 29. Sources Online – W3C at http://www.w3.org/Style/CSS/ Books: – Cascading Style Sheets: Designing for the Web (3rd Edition), Hakon Wium Lie, Bert Bos Training: – Public classes. – Vendor classes, like MadCap’s CSS class. – Other classes, like my RoboHelp CSS class.
  • 30. Hyper/Word Services Offers… Training • Consulting • Development Flare • Flare CSS • Flare Single Sourcing RoboHelp • RoboHelp CSS • RoboHelp HTML5 ViziApps Single sourcing • Structured authoring