Cascading Style Sheet Quick Reference

Similar documents
Appendix D CSS Properties and Values

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

Cascade Stylesheets (CSS)

COSC 2206 Internet Tools. CSS Cascading Style Sheets

CSS Selectors. element selectors. .class selectors. #id selectors

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

Reading 2.2 Cascading Style Sheets

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Adding CSS to your HTML

Controlling Appearance the Old Way

CSS. Lecture 16 COMPSCI 111/111G SS 2018

INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations

escuela técnica superior de ingeniería informática

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

CASCADING STYLESHEETS

CSS Lecture 16 COMPSCI 111/111G SS 2018

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

HTML-5.com itemscopehttp://data-vocabulary.org/breadcrumb<span itemprop="title">html 5</span> itemscopehttp://data-vocabulary.

Parashar Technologies HTML Lecture Notes-4


CMPT 165: More CSS Basics

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Chapter 3 Style Sheets: CSS

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

CSC 443: Web Programming

1 of 7 11/12/2009 9:29 AM

IMY 110 Theme 6 Cascading Style Sheets

CSS Tutorial Part 1: Introduction: A. Adding Style to a Web Page (3 options):

CSS Styles Quick Reference Guide

CSS for Styling CS380

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus

2005 WebGUI Users Conference

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

Fundamentals of Web Programming a

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

CSS: The Basics CISC 282 September 20, 2014

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015

Introduction to CSS. Fijihosting.com Introduction to CSS page 1. What are style sheets? Lovely! How do I use them?

Web Design and Development Tutorial 03

TAG STYLE SELECTORS. div Think of this as a box that contains things, such as text or images. It can also just be a

HTML/XML. HTML Continued Introduction to CSS

Web Engineering CSS. By Assistant Prof Malik M Ali

CSS. Text & Font Properties. Copyright DevelopIntelligence LLC

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

Display, Overflow, White Space, and Cursor Karl Kasischke WCC INP 150 Winter

Cascading Style Sheets (Part II)

BIM222 Internet Programming

CSS Box Model. Cascading Style Sheets

Cascading Style Sheets

Tutorial 3: Working with Cascading Style Sheets

Building Page Layouts

ID1354 Internet Applications

Web Site Design and Development Lecture 6

Introduction to Cascading Style Sheets

CSS: Layout Part 2. clear. CSS for layout and formatting: clear

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

ACSC 231 Internet Technologies

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

CSc 337 LECTURE 3: CSS

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

LBS Polytechnic. Hey! Make With The Style Sheet Already, Bub!

CSC309 Programming on the Web week 3: css, rwd

By Ryan Stevenson. Guidebook #3 CSS

CSS3 Basics. From & CSS Visual Dictionary Learning Curve Books, LLC

ITNP43: HTML Lecture 5

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

CSS. Primer. Developer Guide [Part 4]

Zen Garden. CSS Zen Garden

CSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson

EECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling

Admin. Midterm 1 on. Oct. 13 th (2 weeks from today) Coursework:

8a. Cascading Style Sheet

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

CSS Cascading Style Sheets

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

Client-Side Web Technologies. CSS Part II

View all articles by Kevin Verdana, Tahoma, etc.) for the main body text of a site.

Web Site Design and Development Lecture 7. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

CSE 154 LECTURE 3: MORE CSS

Cascading Style Sheets CSCI 311

Chapter 12: FORMATTING TEXT

Styles, Style Sheets, the Box Model and Liquid Layout

Introduction to Web Tech and Programming

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax

Cascading Style Sheets (CSS)

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Salvedicta. - Hans Selye CSC 210

Web Development & Design Foundations with HTML5

Transcription:

Computer Technology 8/9 Cascading Style Sheet Quick Reference Properties Properties are listed in alphabetical order. Each property has examples of possible values. Properties are not listed if they are not widely supported or if they are only supported by Internet Explorer. background: #ffffff transparent url(images/pattern.gif) fixed /* background doesn't move when page scrolls */ repeat repeat-x /* tile an image horizontal only */ repeat-y /* tile an image vertical only */ no-repeat top center bottom 2px 1px /* exact positioning, from top */ Example: #footer { background:transparent url(images/footer.gif) repeat-x bottom; } This example tiles a transparent GIF only in a horizontal direction, at the bottom of an element (perhaps a DIV) that contains id="footer". background-attachment: fixed background-color: #ffcc00 transparent background-image: url(images/something.gif) background-position: top center bottom 2px 1px background-repeat: repeat repeat-x

border: repeat-y no-repeat 1px solid dashed dotted double /* needs at least 3px to see effect */ ridge /* regular 3d border needs at least 4px to see effect */ groove /* kind of strange, needs at least 4px to see effect */ inset /* like a recessed bevel */ outset /* like a button bevel */ #000000 Example: div { border:2px solid #ffffff; } Browser Differences: borders are drawn INSIDE the container in IE, Opera 7. borders are drawn OUTSIDE the container in Firefox, Netscape 7, Safari. (part of the annoying "box model" conflict) border-collapse: border-top: collapse border-: border-bottom: border-: bottom: clear: 4px /* positions an object 4px up from the bottom of its container */ both clip: color: Clears a "floated" element. See also: float: rect(top bottom ) #000000 /* #RRGGBB, each digit is 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f */

cursor: display: float: rgb(0,0,0) /* (R,G,B), each digit is 0 to 255, does NOT work everywhere */ aqua /* #00ffff */ black /* #000000 */ blue /* #0000ff */ fuchsia /* #ff00ff */ gray /* #808080 */ green /* #008000 */ lime /* #00ff00 */ maroon /* #800000 */ navy /* #000080 */ olive /* #808000 */ purple /* #800080 */ red /* #ff0000 */ silver /* #c0c0c0 */ orange /* #ffa500 */ teal /* #008080 */ white /* #ffffff */ yellow /* #ffff00 */ auto crosshair default pointer /* The cursor that indicates a link on rollover */ move N-resize /* N can be replaced with S, E, W, NE, NW, SE, SW */ text /* Usually rendered as an I-bar */ wait /* Usually rendered as a watch or hourglass */ help /* Makes the element disappear */ block inline Floats something like an image so text flows around it. font-family: verdana,helvetica,sans-serif /* easiest to read at small sizes */ arial,helvetica,sans-serif times,times new roman,serif courier new,courier,monospace cursive /* unpredictable */ fantasy /* unpredictable */ Rules: A font only works for people who have that font installed on their computer. Take into consideration both Windows and Macintosh users. Always include a generic font at the end of the font list.

font-size: 10px /* very small */ 11px /* small to depending on font */ 12px /* */ 16px /* titles */ 40px /* really big */ 0.5em /* relative to parent element */ larger /* relative to parent element */ smaller /* relative to parent element */ font-style: font-variant: font-weight: height: : xx-small /* like HTML H6 */ x-small small /* like HTML H5 */ medium /* like HTML H4 */ large /* like HTML H3 */ x-large /* like HTML H2 */ xx-large /* like HTML H1 */ italic oblique /* same as italic */ small-caps bold 200px 90% 4px letter-spacing: 5px Called "kerning" in Typography. line-height: 130% /* percentage of the font-size, 130 gives a nice look */ 10px /* scrunch 11px font lines together */ Called "Ledding" in Typography. list-style: disc circle square

decimal decimal-leading-zero lower-roman upper-roman lower-alpha upper-alpha lower-greek lower-alpha lower-latin upper-alpha upper-latin url(images/bullet.gif) margin: Note: If you want a custom bullet image, it works better this way: ul {margin:0; padding:0; list-style:;} li { margin:0 0 6px 0; padding:0 0 0 16px; /* padding for bullet image */ background:transparent url(images/bullet.gif) no-repeat; } 0 /* to turn all margins off, no unit is necessary */ 4px /* use a single value for the same margin on all sides */ 2px 0 2px 0 /* specify separate top,, bottom, margins (clockwise from top) */ auto /* if AND are auto, element will be centered */ Margins add transparent space OUTSIDE the background and border. margin-top: Examples: img {margin:2px 0 2px 0;} div (margin: 4px auto 10px auto;} /* div will be horizontally centered */ margin-: margin-bottom: margin-: min-height: Not supported in IE so its fairly useless min-width: Not supported in IE so its fairly useless overflow: padding: visible hidden scroll auto

0 /* to turn all padding off, no unit is necessary */ 4px /* use a single unit for even padding on all sides */ 2px 0 2px 0 /* specify separate top,, bottom, padding (clockwise from top) */ Padding adds space INSIDE the background and border. padding-top: padding-: padding-bottom: padding-: position: : static /* where it would "ly" be in the html flow */ absolute /* position inside the parent element */ relative /* position relative to where it would "ly" be */ fixed /* do not scroll the element as the page scrolls */ 4px Positions an element from the -hand edge of its container. text-align: center justify /* makes even and margins, like a newspaper column */ text-decoration: underline overline line-through blink /* does not work in IE, only works in Firefox, Opera 7 */ text-transform: top: capitalize lowercase uppercase 4px vertical-align: baseline middle sub /* do not use, messes up line spacing, see below */ super /* do not use, messes up line spacing, see below */ text-top text-bottom

Making superscripts and subscripts without messing up the line spacing: CSS.sups {position:relative; top:-4px;}.subs {position:relative; top:4px;} visibility: HTML Here's a superscript<span class="sups">1</span>. hidden /* the element will still influence other elements on the page */ visible white-space: width: z-index: To remove the element completely, use display:; instead. nowrap /* do not wrap a line until a line break, somewhat buggy in some browsers */ pre /* like using <pre> in HTML, requires "strict" mode for IE 6 */ 200px 90% 5 /* a DIV with a z-index of 5 will be "above" those with 4 or lower */ Z-index only applies to other objects in the same container.