CSU - DCE 0715 - Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Length Instructor:

Slides:



Advertisements
Similar presentations
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
Advertisements

Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
Introduction to CSS CSS Backgrounds - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Colors & Backgrounds Instructor: Joseph DiVerdi,
Creating Special Effects with CSS
9-May-15 More CSS. 2 A different emphasis CSS is the same for XML as it is for HTML and XHTML, but-- XML contains no display information If you want your.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Week 7 Web Typography. 2 Understanding Type Design Principles.
Web Design & Development Cascading Style Sheets (CSS)
CS428 Web Engineering Lecture 06 Introduction (Cascading Style Sheet) 1.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
14-Jul-15 CSS Applications to XML. 2 A different emphasis CSS is the same for XML as it is for HTML, but-- HTML already does a pretty good job of layout.
Formatting Text (Plus More Selectors) Learning Web Design: Chapter 12.
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,
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Principles of Web Design 6 th Edition Chapter 5 – Web Typography.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Cascading Style Sheet (CSS)
1Computer Sciences Department. And use
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Introduction to CSS CSS Syntax - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Syntax & Semantics Instructor: Joseph DiVerdi,
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Page Layout with CSS Learning Web Design: Chapter 16.
CSU - DCE Webmaster I HTML - Forms - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Forms Instructor:
Introduction to CSS CSS Fonts - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Font Control Instructor: Joseph DiVerdi, Ph.D.,
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Week 5 Working with Tables. 2 Understanding Table Basics.
CSU - DCE Advanced Perl Web Images - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Imaging on the World Wide Web Instructor: Joseph.
Fundamentals of WWW Imaging Fort Collins, CO Copyright © XTR Systems, LLC Fundamentals of Web Imaging Instructor: Joseph DiVerdi, Ph.D., MBA.
Fundamentals of WWW Imaging Fort Collins, CO Copyright © XTR Systems, LLC Fundamentals of Web Imaging Instructor: Joseph DiVerdi, Ph.D., MBA.
Cascading Style Sheets Objective: Create an external style sheet, embedded style sheet, and an inline style to change the look and feel of a web site.
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.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
Chapter 5 Working with Tables Principles of Web Design, 4 th Edition.
CSU - DCE Webmaster I HTML - Tables - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Tables Instructor:
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,
CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Color Instructor: Joseph.
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:
Positioning and Printing Creating Special Effects with CSS.
Webmaster II Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Webmaster II Instructor: Joseph DiVerdi, Ph.D., MBA.
CSU - DCE Introduction to CSS CSS URLs - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying URLs Instructor: Joseph.
CSS Cascading Style Sheets *referenced from
XHTML HyperText Markup Language Instructs a browser how to “render”/display/format text.
CSU - DCE Introduction to CSS CSS Text - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Text Control Instructor: Joseph.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
CSCI N241: Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Using Cascading Style Sheets Module A: CSS Basics.
CSU - DCE Webmaster I HTML & URLs - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites With HTML - Using Effective Links Instructor:
Internet & World Wide Web How to Program, 5/e 1. 2.
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets™ (CSS)
The Box Model in CSS Web Design – Sec 4-8
Concepts for fluid layout
Css Units: REM, VH & VW Adrian Horsham.
The Box Model in CSS Web Design – Sec 4-8
RESPONSIVE WEB DESIGN.
CSS Applications to XML 19-Sep-18.
More CSS 22-Feb-19.
Cascading Style Sheets
Concepts for fluid layout
CSS Applications to XML 20-May-19.
CSS Applications to XML 3-Jul-19.
Various mobile devices
Cascading Style Sheets™ (CSS)
Presentation transcript:

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Length Instructor: Joseph DiVerdi, Ph.D., M.B.A.

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Length Values Length values –Can be positive or negative Certain properties cannot have negative length units –Have a numerical value –Followed by a unit of measurement 200px There are three basic kinds of length unit –relative –absolute –percentage

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Length Values Absolute units should be used only when the physical characteristics of the output device are absolutely known This means that units like points and pixels should be avoided for monitors –Can not be certain of the logical resolution or screen size

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Absolute Length Units Inches - as found on rulers Centimeters - also as found on rulers Millimeters - also as found on rulers Points - standard typographical measure –72 points per inch –Size of text capital letters 12 point font 1/6" tall Picas - standard typographical measure –6 picas per point

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Length Units

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Absolute Length Units Inch, Centimeter, and Millimeter –All have standard meanings –Are only applicable with calibrated output devices Point and Pica –Standard (and classic) printer's measures –Font sizes are usually defined in terms of points –Are only applicable with calibrated output devices

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Relative Length Units em - standard typographical measure –Called "em-height" –Relative to the current font size Equal to the font size –For 14-point font, one em is 14 points –Change the font size and the em size will change

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Relative Length Units ex - standard typographical measure –Called "ex-height" –Equal to the height of a lowercase "x" in the font –This measure can and will vary with font –Even worse... Many fonts do not specify x-height It is non-trivial for the browser to calculate Browsers often take em value divided by two as ex value –ouch!

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Relative Length Units pixels - the linear size in one dimension of a computer monitor divided by the number of pixels displayed in that dimension –OS Defaults: Macintosh - 72 dpi Windows - 96 dpi –However, # of pixels is under user control ouch! –This is why it is considered relative

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Percentage Length Units A numeric value followed by percentage sign 50% Always computed relative to another value –Usually a length unit H1 { font-size: 18pt; } H1.TALL { line-height: 150%; }

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Percentage Units Specifying width with percentage –Element width will be the percentage of the element which contains it P { width: 75%; } –Means that paragraphs will be 75% the width of their container Usually the BODY Unless contained in something else –e.g., TABLE

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Fluid Web Site Design Developing a Fluid Web Site Design –The same basic layout is realized With different size monitors On different OSes When the window is resized Use percentage WIDTHs Don't use absolute WIDTHs in TABLEs

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Fluid Web Site Design <TABLE BORDER=0 CELLPADDING=10 CELLSPACING=0 VALIGN=TOP WIDTH="100%"> Yadda, yadda, yadda,... Bla, bla, bla,...

CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Personal Web Pages Apply these various length measures to your Web Site Modify your "main" style sheet to apply each measure to some element Note what happens when the Browser's window is resized Verify that each method works in your hands