729G26 Interaction Programming. Lecture 2 Jody Foo,

Size: px
Start display at page:

Download "729G26 Interaction Programming. Lecture 2 Jody Foo,"

Transcription

1 729G26 Interaction Programming Lecture 2 Jody Foo, jody.foo@liu.se

2 Lecture overview CSS syntax: selectors, properties and values CSS: borders and colors Using classes and id:s CSS Box model and layout using CSS display models positioning floats Introduction to RWD (Responsive Web Design) Typography

3 CSS

4 CSS (Cascading Style Sheets) CSS specifies 1.visual style 2.layout HTML elements inherit CSS properties from their ancestors e.g. the value of the font-family property for the body element is inherited by the p element.

5 Aspects of style colors and borders, e.g. background color/image borders around elements typography, e.g. font, font size line height size of elements

6 Aspects of layout Interaction between elements (e.g. what happens when two elements want to use the same space) Size of elements Positioning of elements

7 The style sheet Plain text file A collection of style specifications A HTML document can link to one or more stylesheets Style specifications are evaluated in serial from the top. Later specifications can overrule previous specifications.

8 Syntax declaration selector block declaration p { color:red; font-size:16px; } property value

9 Syntax /* This is a comment */ body { font-family: Times, Serif; font-size: 16px; padding: 0px 0px 0px 0px; } h1 { font-family: Helvetica, Sans-Serif; font-size: 32px; }

10 Some CSS length units Reference: px em rem pt length pixels on screen note: a CSS pixel is not the same as a screen pixel see 1em = inherited font-size, 2em = double inherited font-size 1rem = font-size of root element point, 1pt = 1/72 inch

11 Some CSS length units % percent of inherited size vw 1vw = 1% of width of the viewport's initial containing block (i.e. the <html> block in most cases) vh 1vh = 1% of height of the viewport's initial containing block (i.e. the <html> block in most cases) vmin 1vmin = 1% of the smallest viewport unit, either vh or vw vmax 1vmax = 1% of the largest viewport unit, either vh or vw

12 HTML + CSS Text files CSS can be written in the same file, but we will use an external file. Link HTML and CSS using the link tag in the header

13 page.html & style.css <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>a document</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>the Heading</h1> <p>the paragraph</p> <body> </html> body { font-family: Times, Serif; font-size: 16px; padding: 0px 0px 0px 0px; } h1 { font-family: Helvetica, Sans-Serif; font-size: 32px; }

14 Filepaths in HTML and CSS Unless otherwise specified, all filepaths are relative to the current file. / means the root of the web site, i.e. for the root is means go up one directory

15 Examples of properties

16 Some style properties HTML elements font-size: size of font font-family: name of font line-height: height of linne width: width of element height: height of element margin: distance to next element padding: distance to element content color: font color background-color: background color of element border: border style of element

17 Basic CSS

18 A selection of selectors

19 Selecting your selector Targeting a group of elements "select all paragraphs and list items" Targeting adjacent siblings "select all paragraphs that directly follow a heading" Targeting descendants "select any image that is inside a <article>" Targeting children "select all first level list items in unordered lists with the class 'toc'"

20 Select a group of elements /* Target all h1, h2 and h3 element */ h1, h2, h3 { border: 2px solid #000; }

21 Descendant combinator /* Select all li element that are nested within a nav element. */ nav li { color: #F00; }

22 Child combinator /* Target all p elements that are children of a div */ div > p { border: 2px solid #000; }

23 Adjacent sibling combinator /* Target all p elements that are on the same level as a h1 and follow a h1 */ h1 + p { font-weight: bold; }

24 Pseudo selectors :hover Select elements that the mouse is hovering above e.g. a:hover :visited Select elements (i.e. links) that have been visited e.g. a:visited

25 Classes and id:s

26 What is a class? When should I use it? Elements can be assigned one or more classes More than one element can be assigned the same class. Use classes for recurring components of your web page. The prefix. (dot) is used to in front of class names in CSS selectors. HTML start tag examples: <div class="box">, <div class="box green-bg"> CSS selector examples:.box, div.box, div.box.green-bg, green-bg

27 Example of using multiple classes.wrapper { width: 960px; }.green-bg { background-color: green; }.yellow-bg { background-color: yellow; } <div class="wrapper"> <div class="green-bg box">box 1</div> <div class="green-yellow box">box 2</div> <div class="box blue-fg">box 3</div> <!-- If multiple classes conflict, the order of their specification in the CSS file governs priority --> <div class="green-bg yellow-bg box">box 4</div> </div>.blue-fg { color: blue; }.box { border: 1px solid purple; width: 100px; height: 100px; }

28 Multiple classes

29 What is an id? When should I use it? Elements can be assigned an id An id can only be assigned to a single element in a HTML document. Use ids for unique elements on your page that you want to target for a specific style. The prefix # (octothorpe, hash sign, pound sign) is used in front of id:s in CSS selectors. HTML start tag examples: <div id="footer">, <h1 id="main-heading"> CSS selector examples: #footer, div#footer, h1#main-heading, #main-heading

30 Selectors using classes and ids.infobox { font-family: Helvetica, Arial, Sans-Serif; font-size: 0.9em; background-color: #999; color: #000; border: 2px solid black; } #menu { background-color: #000; color: #FFF; }

31 Colors and borders

32 Specifying color: RGB Red, Green, Blue - Additive color model Values from (decimal) or 0-F or 00-FF (hex) Black rgb(0, 0, 0) or #000 or # White rgb(255, 255, 255) or #FFF or #FFFFFF Purple rgb(128, 0, 255) or #8000FF

33 Specifying color: named colors CSS Level 1: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua CSS Level 2 (Revision 1): + orange CSS Color Module Level 3: + aliceblue, antiquewhite, aquamarine, azure, beige, bisque, blanchedalmond, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan (synonym of aqua), darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, gainsboro, ghostwhite, gold, goldenrod, greenyellow, grey, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, limegreen, linen, magenta, (synonym of fuchsia), mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, oldlace, olivedrab, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, thistle, tomato, turquoise, violet, wheat, whitesmoke, yellowgreen CSS Color Module Level 4: + rebeccapurple

34 Color Inspiration Adobe Color CC material design palette paletton

35 background-color, color h1 { color: #fff; background-color: #075488; }

36 CSS Borders Certain elements can have a border A border has the following properties: width style color

37 CSS Borders Shorthand declaration border: <width> <style> <color> Specific properties border-style, border-width, border-color border-top, border-right, border-bottom, border-left border-top-style, border-top-color etc

38 The CSS Box & Layout Model

39 Layout models in CSS Normal flow + positioning display: block inline inline-block Flexbox display: flex Grid layout display: grid Floats float: left right Table layout Multiple-column layout

40 What should you use/learn? In CSS each element exists inside a layout context provides a layout context for the elements in contains Even though you create a layout using flex or grid, the contents of your flex/grid will have a normal flow. Therefore, master normal flow + positioning + floats before learning flex/grid etc. Flexbox and grid layout can be very useful but cannot solve everything. OOP analogy: OOP structures non-oop code. But you do not need OOP to program.

41 Normal flow Elements can be set to be displayed in different contexts. Contexts for normal flow: block inline inline-block The inline context is in line with text with the generic inline element being <span> The block context is outside text with the generic block element being <div>. A block element occupies an area from left to right. Ths inline-block context is a block in line with text.

42 The display property /* The formatting context is set using the display property */.infobox { display: block; }.question { display: inline; }

43 The CSS box model (block context)

44 Specifying an elements padding padding: <north>, <east>, <south>, <west> padding-top: <value>; padding-right: <value>; padding-bottom: <value>; padding-left: <value>;

45 Specifying an elements margin margin: <north>, <east>, <south>, <west> margin-top: <value>; margin-right: <value>; margin-bottom: <value>; margin-left: <value>;

46 Positioning

47 Four Five positioning models position: static position: relative position: fixed position: absolute position: sticky z-index: <number>

48 Layout using positioning Blocks are statically positioned by default position: static Relative positioning adjusts the static position relatively position: relative; top: -20px; left: 20px;

49 Layout using positioning A block can be fixed to a position relative to the viewport position: fixed; bottom: 0px; right: 0px; Elements positions using absolute are positioned relative to the nearest positioned ancestor. position: absolute; top: -20px; left: 20px;

50 Layout using positioning Relatively positioned until scrolled to a threshold point position: sticky; top: 30px; left: 30px; "when the element reaches 30px from the top / 30px from the left, stick to that position"

51 Floats

52 Floats Intended use: floating images in text (i.e. text wraps around image) Actual use: all sorts of layout stuff Syntax: float: left right What happens? Floated element gets taken out from the static/normal layout context and "floats" inside its containing block. Note:

53 The clearfix hack Needed when using floats for layout purposes and we want to prevent additional elements to flow around the floated elements. Property: clear Values: left right both

54 Layout sandbox

55 Responsive design

56 Responsive design Respond to the display used to render a HTML document high resolution desktop tablet smartphone etc

57 Responsive design A design can respond by e.g. altering sizes of images adjusting column widths adjusting number of columns used placement of navigation etc

58 Very quick RWD howto Set device viewport i.e. ask the browser how many pixels (DIPs, Device-Independant-Pixels) wide its display is <meta name="viewport" content="width=device-width,initial-scale=1"> Use media-queries to add conditions to your CSS (two options): 1. link to stylesheet with media-query <link rel="stylesheet" media="screen and (min-width:500px)" href="small.css"> 2. embed in CSS in screen and (min-width: 500px) { /* your small CSS here */ } Decide break points, i.e. at which points do layout changes occur. Tip: go from small to large. Remember CSS is read sequentially! Note: min-width/max-width is width of browser window, min-device-width/maxdevice-width is width of screen on device.

59 Some resources Responsive Web Design What It Is And How To Use It Responsive Web Design Basics Responsive Design Is... Responsive design

60 Typography

61 font-family and font-size /* Use a CSS selector to delimit the scope of the declarations */ p { } font-family: "Comic Sans"; font-size: 48pt

62 font-weight and font-style Use font-weight to set how thick a font's lines should be, e.g. font-weight: bold; font-weight: 900; Use font-style to set a font s style to normal, italic or oblique italic is a cursive style of a font oblique is a slanting style of a font

63 The font stack /* Use a font stack to specify font family preference in descending order. */ p { } font-family: Helvetica, Arial, Sans-Serif; font-size: 42pt;

64 Some further reading CSS Font stacks

65 More CSS

CSS. https://developer.mozilla.org/en-us/docs/web/css

CSS. https://developer.mozilla.org/en-us/docs/web/css CSS https://developer.mozilla.org/en-us/docs/web/css http://www.w3schools.com/css/default.asp Cascading Style Sheets Specifying visual style and layout for an HTML document HTML elements inherit CSS properties

More information

Premier IDX Search. Site Administrator User Manual. September 16, 2018 Version 1.40

Premier IDX Search. Site Administrator User Manual. September 16, 2018 Version 1.40 Premier IDX Search Site Administrator User Manual September 16, 2018 Version 1.40 Table Of Contents Login to the Premier IDX Administration Section... 3 Start Page - Administration Overview... 4 Find A

More information

ShaDe for SketchUp. User's Guide All rights reserved For research use only (non-commercial use) Manuela Ruiz Montiel and Universidad de Málaga

ShaDe for SketchUp. User's Guide All rights reserved For research use only (non-commercial use) Manuela Ruiz Montiel and Universidad de Málaga ShaDe for SketchUp User's Guide All rights reserved For research use only (non-commercial use) Manuela Ruiz Montiel and Universidad de Málaga Author Manuela Ruiz Montiel Date September 5, 2012 Version

More information

4D Systems. Application Note: 4D-AN-M DGL Colour CONSTANTS. Document Date: 15 th December Document Revision: 1.0

4D Systems. Application Note: 4D-AN-M DGL Colour CONSTANTS. Document Date: 15 th December Document Revision: 1.0 4D Systems Application Note: 4DGL Colour CONSTANTS Document Date: 15 th December 2012 Document Revision: 1.0 2012 4D Systems www.4dsystems.com.au Page 1 of 6 Description This Application Note is dedicated

More information

Quick Reference Library

Quick Reference Library Quick Reference Library CSS Quick Reference Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved. Trademark Information. Welcome to the DevGuru Cascading Style Sheets Quick Reference

More information

Appendix A : srgb Colors

Appendix A : srgb Colors Appendix A : srgb Colors The SVG specification reads with regard to colours: All SVG colors are specified in the srgb color space. At a minimum, SVG user agents shall conform to the color behavior requirements

More information

Color Coding Your Items. How to Dynamically Change the Color of Objects on Your Template WHITE PAPER

Color Coding Your Items. How to Dynamically Change the Color of Objects on Your Template WHITE PAPER Color Coding Your Items How to Dynamically Change the Color of Objects on Your Template WHITE PAPER Contents Overview 3 Using Layers to Change Object Color 4 How Layers Work in BarTender 4 Conditional

More information

CoDrone LINK. Communication Bluetooth Low Energy

CoDrone LINK. Communication Bluetooth Low Energy CoDrone LINK Communication Bluetooth Low Energy Updated in April 14th, 2016 Contents 1. Introduction 2. Data Link 3. Data Structure 1. Introduction CoDrone uses Bluetooth Low Energy (BLE) technology. DRONE_SERVICE

More information

SAS with Style: Creating your own ODS Style Template

SAS with Style: Creating your own ODS Style Template Paper 195-28 SAS with Style: Creating your own ODS Style Template Lauren Haworth, Genentech, Inc., South San Francisco, CA ABSTRACT Once you ve started using the Output Delivery System, you ll quickly

More information

A Proposal to Add 2D Graphics Rendering and Display to C++

A Proposal to Add 2D Graphics Rendering and Display to C++ Document Number: P0267R6 Date: 2017-07-30 Revises: P0267R5 Reply to: Michael B. McLaughlin mikebmcl@gmail.com Audience: Herb Sutter Microsoft Inc. hsutter@microsoft.com Jason Zink jzink_1@yahoo.com Guy

More information

A Proposal to Add 2D Graphics Rendering and Display to C++

A Proposal to Add 2D Graphics Rendering and Display to C++ Document Number: P0267R7 Date: 2018-02-10 Revises: P0267R6 Reply to: Michael B. McLaughlin mikebmcl@gmail.com Audience: Herb Sutter Microsoft Inc. hsutter@microsoft.com Jason Zink jzink_1@yahoo.com Guy

More information

A Proposal to Add 2D Graphics Rendering and Display to C++

A Proposal to Add 2D Graphics Rendering and Display to C++ Document Number: P0267R5 Date: 2017-06-19 Revises: P0267R4 Reply to: Michael B. McLaughlin mikebmcl@gmail.com Audience: Herb Sutter Microsoft Inc. hsutter@microsoft.com Jason Zink jzink_1@yahoo.com Guy

More information

Cascading Style Sheets Reference

Cascading Style Sheets Reference Background Cascading Style Sheets Reference http://www.w3schools.com/css/css_reference.asp Property Description Values IE F N W3C background background-attachment background-color background-image background-position

More information

AlbumEasy V3.9 Reference

AlbumEasy V3.9 Reference AlbumEasy V3.9 Reference Edited From The Albumeasy Help File By : Raymond King rayking@mweb.co.za http://www.thestampweb.com/ AlbumEasy V3.8 A Programme for Creating Custom Stamp Albums. INDEX 1. Workflow

More information

Pymaging Documentation

Pymaging Documentation Pymaging Documentation Release 0.0.0 Jonas Obrist February 22, 2016 Contents 1 About 1 2 User Documentation 3 2.1 Installation................................................ 3 2.1.1 Requirements..........................................

More information

Lecturer. Haider M. Habeeb. Second Year, First Course

Lecturer. Haider M. Habeeb. Second Year, First Course University of Babylon College of Information Technology Department of Information Networks Lecturer Haider M. Habeeb Second Year, First Course 2012-2013 HTML Attributes Attributes are another important

More information

Creating Online Content for Pocket PC. Pocket Internet Explorer HTML Element Reference

Creating Online Content for Pocket PC. Pocket Internet Explorer HTML Element Reference Seite 1 von 120 Creating Online Content for Pocket PC Pocket Internet Explorer HTML Element Reference This reference specifies the HTML elements that are supported for Microsoft Windows Powered Pocket

More information

A Proposal to Add 2D Graphics Rendering and Display to C++

A Proposal to Add 2D Graphics Rendering and Display to C++ Document Number: Date: 2016-02-12 Revises: N4073 Reply to: Michael B. McLaughlin mikebmcl@gmail.com Audience: Herb Sutter Microsoft Inc. hsutter@microsoft.com Jason Zink jzink_1@yahoo.com LEWG A Proposal

More information

Zen Garden. CSS Zen Garden

Zen Garden. CSS Zen Garden CSS Patrick Behr CSS HTML = content CSS = display It s important to keep them separated Less code in your HTML Easy maintenance Allows for different mediums Desktop Mobile Print Braille Zen Garden CSS

More information

CSC309 Programming on the Web week 3: css, rwd

CSC309 Programming on the Web week 3: css, rwd CSC309 Programming on the Web week 3: css, rwd Amir H. Chinaei, Spring 2017 Office Hours: M 3:45-5:45 BA4222 ahchinaei@cs.toronto.edu http://www.cs.toronto.edu/~ahchinaei/ survey 1 in survey 1, you provide

More information

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

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model) INTRO TO CSS RECAP HTML WHAT IS CSS ADDING CSS TO YOUR HTML DOCUMENT CSS IN THE DIRECTORY TREE CSS RULES A FEW CSS VALUES (colour, size and the box model) CSS SELECTORS SPECIFICITY WEEK 1 HTML In Week

More information

Mapgen by Gary68. User's manual. Version 1.19, April 2011

Mapgen by Gary68. User's manual. Version 1.19, April 2011 Mapgen by Gary68 User's manual Version 1.19, April 2011 Table of Contents Introduction...3 Hints...3 Installation...3 Basic parameters...5 Output...5 Usage examples...5 Map size and the like...6 Advanced

More information

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

CSS Selectors. element selectors. .class selectors. #id selectors CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors

More information

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:

More information

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:

More information

A Proposal to Add 2D Graphics Rendering and Display to C++

A Proposal to Add 2D Graphics Rendering and Display to C++ Document Number: P0267R8 Date: 2018-06-26 Revises: P0267R7 Reply to: Michael B. McLaughlin mikebmcl@gmail.com Audience: Herb Sutter Microsoft Inc. hsutter@microsoft.com Jason Zink jzink_1@yahoo.com Guy

More information

Some notes on CSS. John R Hudson. 12th October 2015

Some notes on CSS. John R Hudson. 12th October 2015 Some notes on CSS John R Hudson 12th October 2015 Contents 1 Background 2 2 Using styles 3 3 Syntax 3 3.1 @ rules.............. 3 3.2 Backslash............ 4 4 Media types 4 5 Layout 4 5.1 The containing

More information

Appendix D CSS Properties and Values

Appendix D CSS Properties and Values HTML Appendix D CSS Properties and Values This appendix provides a brief review of Cascading Style Sheets (CSS) concepts and terminology, and lists CSS level 1 and 2 properties and values supported by

More information

CSS: The Basics CISC 282 September 20, 2014

CSS: The Basics CISC 282 September 20, 2014 CSS: The Basics CISC 282 September 20, 2014 Style Sheets System for defining a document's style Used in many contexts Desktop publishing Markup languages Cascading Style Sheets (CSS) Style sheets for HTML

More information

Reading 2.2 Cascading Style Sheets

Reading 2.2 Cascading Style Sheets Reading 2.2 Cascading Style Sheets By Multiple authors, see citation after each section What is Cascading Style Sheets (CSS)? Cascading Style Sheets (CSS) is a style sheet language used for describing

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 3 Cascading Style Sheets (CSS) Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you

More information

Chapter 3 Style Sheets: CSS

Chapter 3 Style Sheets: CSS WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE JEFFREY C. JACKSON Chapter 3 Style Sheets: CSS 1 Motivation HTML markup can be used to represent Semantics: h1 means that an element is a top-level heading

More information

CSS: Cascading Style Sheets

CSS: Cascading Style Sheets CSS: Cascading Style Sheets Computer Science and Engineering College of Engineering The Ohio State University Lecture 13 Evolution of CSS MIME type: text/css CSS 1 ('96): early recognition of value CSS

More information

Some notes on CSS. John R Hudson. 10th March 2018

Some notes on CSS. John R Hudson. 10th March 2018 Some notes on CSS John R Hudson 10th March 2018 Contents 1 Background 3 2 Using styles 3 3 Syntax 4 3.1 @ rules.............. 4 3.2 Backslash............ 6 4 Media types 7 5 Layout 7 5.1 The containing

More information

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

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Make a Website A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Overview Course outcome: You'll build four simple websites using web

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css images boris.jpg Types of CSS External Internal Inline External CSS An external style sheet is a text document with

More information

Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) Cascading Style Sheets (CSS) Mendel Rosenblum 1 Driving problem behind CSS What font type and size does introduction generate? Answer: Some default from the browser (HTML tells what browser how)

More information

In this series of lessons, I will show you how to use the MQL4 for building your own Expert Advisors, Custom Indicators and Scripts.

In this series of lessons, I will show you how to use the MQL4 for building your own Expert Advisors, Custom Indicators and Scripts. 1 of 258 6/14/2006 5:36 PM Mql - Metatrader Development Course Welcome to MQL4 course! Welcome to the MQL4 course. In this series, I will try to strip the mystique and confusion from MQL4 by giving you

More information

Controlling Appearance the Old Way

Controlling Appearance the Old Way Webpages and Websites CSS Controlling Appearance the Old Way Older webpages use predefined tags - - italic text; - bold text attributes - Tables (and a few other elements) use specialized

More information

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

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet. CSS Tutorial Part 1: Introduction: CSS adds style to tags in your html page. With HTML you told the browser what things were (e.g., this is a paragraph). Now you are telling the browser how things look

More information

CSS. Lecture 16 COMPSCI 111/111G SS 2018

CSS. Lecture 16 COMPSCI 111/111G SS 2018 CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS Styles A style changes the way the HTML code is displayed Same page displayed using different styles http://csszengarden.com Same page with a style sheet

More information

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

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS3 is on its way - CSSs provide the means to control and change presentation of HTML documents - CSS is not

More information

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

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

More information

ID1354 Internet Applications

ID1354 Internet Applications ID1354 Internet Applications CSS Leif Lindbäck, Nima Dokoohaki leifl@kth.se, nimad@kth.se SCS/ICT/KTH What is CSS? - Cascading Style Sheets, CSS provide the means to control and change presentation of

More information

CSS Lecture 16 COMPSCI 111/111G SS 2018

CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS CSS Lecture 16 COMPSCI 111/111G SS 2018 Styles Astyle changes the way the HTML code is displayed Same page displayed using different styles Same page with a style sheet body font-family: sans-serif;

More information

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

Downloads: Google Chrome Browser (Free) -   Adobe Brackets (Free) - Week One Tools The Basics: Windows - Notepad Mac - Text Edit Downloads: Google Chrome Browser (Free) - www.google.com/chrome/ Adobe Brackets (Free) - www.brackets.io Our work over the next 6 weeks will

More information

IDM 221. Web Design I. IDM 221: Web Authoring I 1

IDM 221. Web Design I. IDM 221: Web Authoring I 1 IDM 221 Web Design I IDM 221: Web Authoring I 1 Week 4 IDM 221: Web Authoring I 2 Presenta(on IDM 221: Web Authoring I 3 Up until this point everything we've focused on has been related to content, and

More information

To link to an external stylesheet, the link element is placed within the head of the html page:

To link to an external stylesheet, the link element is placed within the head of the html page: CSS Basics An external style sheet is simply a text file (use BBEdit or Textwrangler) containing style rules, saved with the.css extension. It s best practice to keep style sheets for a site grouped within

More information

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

CSS Tutorial Part 1: Introduction: A. Adding Style to a Web Page (3 options): CSS Tutorial Part 1: Introduction: CSS adds style to tags in your html page. With HTML you told the browser what things were (e.g., this is a paragraph). Now you are telling the browser how things look

More information

08/10/2018. Liceo delle Scienze Applicate. Computer Science. Fourth course

08/10/2018. Liceo delle Scienze Applicate. Computer Science. Fourth course 08/10/2018 Liceo delle Scienze Applicate Computer Science Fourth course Topics: HTML CSS JavaScript Setting up a Local Server PHP MySQL and Relational Databases Appendices Thanks to Jeffrey Way for a lot

More information

VisualEther Protocol Analyzer 7.0

VisualEther Protocol Analyzer 7.0 VisualEther Protocol Analyzer 7.0 WIRESHARK TO SEQUENCE DIAGRAMS... 1 Convert Wireshark pcap to sequence diagrams... 1 Select messages and parameters to include in sequence diagrams... 4 Bookmark messages

More information

Cascading Style Sheets Level 2

Cascading Style Sheets Level 2 Cascading Style Sheets Level 2 Course Objectives, Session 1 Level 1 Quick Review Chapter 6 Revisit: Web Fonts Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your Site s Navigation Begin

More information

CSS: Cascading Style Sheets

CSS: Cascading Style Sheets What are Style Sheets CSS: Cascading Style Sheets Representation and Management of Data on the Internet, CS Department, Hebrew University, 2007 A style sheet is a mechanism that allows to specify how HTML

More information

CSS Styles Quick Reference Guide

CSS Styles Quick Reference Guide Table 1: CSS Font and Text Properties Font & Text Properties Example(s) font-family Font or typeface font-family: Tahoma font-size Size of the font font-size: 12pt font-weight Normal or bold font-weight:

More information

Web Site Design and Development Lecture 5

Web Site Design and Development Lecture 5 Web Site Design and Development Lecture 5 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM CSS CSS stands for Cascading Style Sheets. These style sheets define the look and layout of your HTML elements. A

More information

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

<body bgcolor=  fgcolor=  link=  vlink=  alink= > These body attributes have now been deprecated, and should not be used in XHTML. CSS Formatting Background When HTML became popular among users who were not scientists, the limited formatting offered by the built-in tags was not enough for users who wanted a more artistic layout. Netscape,

More information

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

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 3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification

More information

BIM222 Internet Programming

BIM222 Internet Programming BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements

More information

Introduction to OpenDX. Mike Bailey. OpenDX

Introduction to OpenDX. Mike Bailey. OpenDX Introduction to OpenDX Mike Bailey OpenDX Started out life as IBM Visualization Data Explorer When the product was cancelled, IBM put it into Open Source and renamed it OpenDX Basic premise is a series

More information

Introduction to OpenDX

Introduction to OpenDX Introduction to OpenDX Mike Bailey OpenDX Started out life as IBM Visualization Data Explorer When the product was cancelled, IBM put it into Open Source and renamed it OpenDX Basic premise is a series

More information

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

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values 3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification

More information

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

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers

More information

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

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers

More information

Chapter 4 CSS basics

Chapter 4 CSS basics Sungkyunkwan University Chapter 4 CSS basics Prepared by J. Lee and H. Choo Web Programming Copyright 2000-2018 Networking Laboratory 1/48 Copyright 2000-2012 Networking Laboratory Chapter 4 Outline 4.1

More information

The Benefits of CSS. Less work: Change look of the whole site with one edit

The Benefits of CSS. Less work: Change look of the whole site with one edit 11 INTRODUCING CSS OVERVIEW The benefits of CSS Inheritance Understanding document structure Writing style rules Attaching styles to the HTML document The cascade The box model CSS units of measurement

More information

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

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student Welcome Please sit on alternating rows powered by lucid & no.dots.nl/student HTML && CSS Workshop Day Day two, November January 276 powered by lucid & no.dots.nl/student About the Workshop Day two: CSS

More information

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

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

CSS. Shan-Hung Wu CS, NTHU

CSS. Shan-Hung Wu CS, NTHU CSS Shan-Hung Wu CS, NTHU CSS Zen Garden 2 Outline The Basics Selectors Layout Stacking Order 3 Outline The Basics Selectors Layout Stacking Order 4 Grammar selector { property: value; 5 Example /* for

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 6 Slide 1 of 28 Week 6 Agenda

More information

CoolSpools. Programmer s Guide. Version V5R1M0 June ariadne software ltd, cheltenham, england

CoolSpools. Programmer s Guide. Version V5R1M0 June ariadne software ltd, cheltenham, england oolspools Programmer s Guide Version V5R1M0 June 2005 ariadne software ltd, cheltenham, england Table of ontents Introduction... 5 The oolspools onversion API... 6 RPG opybooks... 6 oolspools onversion

More information

Introduction to WEB PROGRAMMING

Introduction to WEB PROGRAMMING Introduction to WEB PROGRAMMING Web Languages: Overview HTML CSS JavaScript content structure look & feel transitions/animation s (CSS3) interaction animation server communication Full-Stack Web Frameworks

More information

Cascade Stylesheets (CSS)

Cascade Stylesheets (CSS) Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Last revision: Manuel Resinas (october 2007) Tiempo: 2h escuela técnica superior de ingeniería informática Departamento de Lenguajes

More information

Cascading Style Sheet Quick Reference

Cascading Style Sheet Quick Reference 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

More information

CSC 443: Web Programming

CSC 443: Web Programming 1 CSC 443: Web Programming Haidar Harmanani Department of Computer Science and Mathematics Lebanese American University Byblos, 1401 2010 Lebanon CSC443: Web Programming 2 for Styling The good, the bad

More information

COSC 2206 Internet Tools. CSS Cascading Style Sheets

COSC 2206 Internet Tools. CSS Cascading Style Sheets COSC 2206 Internet Tools CSS Cascading Style Sheets 1 W3C CSS Reference The official reference is here www.w3.org/style/css/ 2 W3C CSS Validator You can upload a CSS file and the validator will check it

More information

Description Syntax Remarks and examples Also see

Description Syntax Remarks and examples Also see Title stata.com xl( ) Excel file I/O class Description Syntax Remarks and examples Also see Description The xl() class allows you to create Excel 1997/2003 (.xls) files and Excel 2007/2013 (.xlsx) files

More information

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

CSS مفاهیم ساختار و اصول استفاده و به کارگیری CSS مفاهیم ساختار و اصول استفاده و به کارگیری Cascading Style Sheets A Cascading Style Sheet (CSS) describes the appearance of an HTML page in a separate document : مسایای استفاده از CSS It lets you separate

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css charlie.jpg Linking to your HTML You need to link to your css in the of your HTML file.

More information

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Note: We skipped Study Guide 1. If you d like to review it, I place a copy here: https:// people.rit.edu/~nbbigm/studyguides/sg-1.docx

More information

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets CMPT 165: Cascading Style Sheets Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 7, 2011 Methods for configuring Cascading Style Sheets There are 4 method to

More information

INTRODUCTION TO CSS. Topics MODULE 5

INTRODUCTION TO CSS. Topics MODULE 5 MODULE 5 INTRODUCTION TO CSS Topics > Cascading Style Sheets (CSS3) Basics Adding a Style Sheet Selectors Adding Dynamic Styles to Elements CSS3 Properties CSS3 Box Model Vendor Prefixes Cascading Style

More information

What is the Box Model?

What is the Box Model? CSS Box Model What is the Box Model? The box model is a tool we use to understand how our content will be displayed on a web page. Each HTML element appearing on our page takes up a "box" or "container"

More information

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University

More information

CSS for Styling CS380

CSS for Styling CS380 1 CSS for Styling The good, the bad and the 2 ugly! shashdot. News for nerds!! You will never, ever be bored here!

More information

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube {

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube { .hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in;.tube { color: #996600; height: 3in; width: 12in; position: fixed; What is CSS? Cascading Style Sheets CSS is responsible

More information

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 LEARNING OUTCOMES In this chapter, you will learn how to... Describe the evolution of style sheets from print media to the Web List

More information

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee Class 3 Page 1 Using DW tools to learn CSS Dreaweaver provides a way for beginners to learn CSS. Here s how: After a page is set up, you might want to style the . Like setting up font-family, or

More information

Cascading Style Sheets. Overview and Basic use of CSS

Cascading Style Sheets. Overview and Basic use of CSS Cascading Style Sheets Overview and Basic use of CSS What are Style Sheets? A World Wide Web Consortium (W3C) defined standard A way for web page designers to separate the formatting of a document from

More information

Lab Introduction to Cascading Style Sheets

Lab Introduction to Cascading Style Sheets Lab Introduction to Cascading Style Sheets For this laboratory you will need a basic text editor and a browser. In the labs, winedt or Notepad++ is recommended along with Firefox/Chrome For this activity,

More information

CSC 337. Cascading Style Sheets. Marty Stepp, Rick Mercer

CSC 337. Cascading Style Sheets. Marty Stepp, Rick Mercer CSC 337 Cascading Style Sheets Marty Stepp, Rick Mercer Preview of a style sheet /* The good way, with a preview of cascading style sheet (css) that has class mystyle */ body { background-color: grey;.mystyle

More information

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

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Web Development & Design Foundations with HTML5 Ninth Edition Chapter 3 Configuring Color and Text with CSS Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of links

More information

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

INTRODUCTION TO CSS. Mohammad Jawad Kadhim INTRODUCTION TO CSS Mohammad Jawad Kadhim WHAT IS CSS Like HTML, CSS is an interpreted language. When a web page request is processed by a web server, the server s response can include style sheets,

More information

Fundamentals of Web Programming a

Fundamentals of Web Programming a Fundamentals of Web Programming a Cascading Style Sheets Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science a Copyright 2009 Teodor Rus. These slides have been developed

More information

YouTube Break. https://www.youtube.com/watch?v=lvtfd_rj2he

YouTube Break. https://www.youtube.com/watch?v=lvtfd_rj2he Layout Jeff Avery YouTube Break https://www.youtube.com/watch?v=lvtfd_rj2he Positioning Visual Components Previously, we learned about event handling and model-view-control architecture. Next, we need

More information

CSS. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/43

CSS. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/43 CSS MPRI 2.26.2: Web Data Management Antoine Amarilli Friday, December 7th 1/43 Overview Cascading Style Sheets W3C standard: CSS 1 1996 CSS 2 1998 CSS 2.1 2011, 487 pages CSS 3.0 Ongoing (various modules),

More information

Web Engineering CSS. By Assistant Prof Malik M Ali

Web Engineering CSS. By Assistant Prof Malik M Ali Web Engineering CSS By Assistant Prof Malik M Ali Overview of CSS CSS : Cascading Style Sheet a style is a formatting rule. That rule can be applied to an individual tag element, to all instances of a

More information

Media Types & Media Features

Media Types & Media Features Media Types & Media Features Same HTML, Different CSS R. Scott Granneman r Jans Carton 1.6 2008 R. Scott Granneman Last updated 2018-08-21 You are free to use this work, with certain restrictions. For

More information

2. Write style rules for how you d like certain elements to look.

2. Write style rules for how you d like certain elements to look. CSS for presentation Cascading Style Sheet Orientation CSS Cascading Style Sheet is a language that allows the user to change the appearance or presentation of elements on the page: the size, style, and

More information

Styles, Style Sheets, the Box Model and Liquid Layout

Styles, Style Sheets, the Box Model and Liquid Layout Styles, Style Sheets, the Box Model and Liquid Layout This session will guide you through examples of how styles and Cascading Style Sheets (CSS) may be used in your Web pages to simplify maintenance of

More information

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

INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations Hun Myoung Park (1/26/2019) Cascading Style Sheets: 1 INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations ADC5030401 (2 Credits) Introduction

More information