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

Size: px
Start display at page:

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

Transcription

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

2 Box Model All block elements and some inline elements, like img, are placed inside a box This lets you set the height and width of the element as well as the margin, padding and border 2

3 Box model diagram Content Padding Margin The total height and width of a box is the content area plus the size of the padding, margin and border All parts of the box model are present even if they are not display to the user Border 3

4 height and width The height and width properties set the height and width of the content area of a block element They can both accept absolute and relative values as a well as auto Setting width to auto will make the width of the block be the same as the width of the block containing it. This is the default Setting the height to auto will make the height of the block be however much vertical space is needed for the content. This is the default 4

5 height and width continued Setting the height or width to a percent will set the height or width to a percent of the containing block s height or width. For this to work, the containing block s height or width needs to be specifed explicitly. If you do not explicitly set the containing block s height, the percent value is ignored and auto is used. 5

6 height and width examples height: 120px; height: 5em; height: 50%; width: 960px; width: 80%; width: auto; 6

7 min-width and max-width The min-width and max-width properties set how thin and how wide an element can be if it scales. The content area cannot be any narrower than min-width, nor can be it any wider than max-width min-width and max-width will accept absolute and relative values 7

8 Examples of min-width and max-width min-width: 10em; min-width: 150px; max-width: 60%; max-width: 600px; 8

9 min-height and max-height The min-height and max-height properties set how short and how tall an element can be if it scales. The content area cannot be any shorter than min-height, nor can be it any taller than max-height min-height and max-height will accept absolute and relative values For max-height, you can specify none to say that there is not a max-height 9

10 Examples of min-height and max-height min-height: 50px; min-height: 2em; max-height: 75%; max-height: none; 10

11 margin margin is a shorthand property that sets the space between the border and the outside edge of the box A shorthand property is one like font where you can set the value for multiple individual properties in one margin can be set to both absolute and relative values as well as auto Auto is used to automatically set the margin. This is commonly used to center something by setting the left and right margins to auto. For this to work, you must also set the width of the element If you stack two elements vertically, you end up with collapsed margins. This means that the larger of the two margins is used and the smaller is ignored 11

12 Margin continued Margin can be set 4 diferent ways One value to set the margin for all 4 sides margin: 10px; Two values with the frst value specifying the top and bottom margins and the second value specifying the left and right margin: 1em auto; Three values with the frst value specifying the top margin, the second specifying the left and right margins and the third value specifying the bottom margin margin: 0.5em 0 1em; Four values specifying the margin in this order: top, right, bottom and left margin: 10px 0 10px 0; 12

13 Setting one margin at a time margin is a shorthand property for the margin-top, margin-right, marginbottom and margin-left properties You can use these properties to set only the margins you wish to set in a particular style rule. Like the margin property, these will accept absolute and relative values as well as auto 13

14 Margin examples margin: 5px; margin: 1em auto; margin-left: 2em; Margin-right: 20%; margin-top: 1.5em; margin-bottom: 20px; 14

15 padding padding is a shorthand property that sets the space between the content and the border of a box padding will accept both absolute and relative values Unlike margin, elements that are stacked do not have their padding collapsed. As such, if you set the top and bottom margin to 0, you can use padding to space elements vertically 15

16 Padding continued Like margin, padding can be set 4 diferent ways One value to set the padding for all 4 sides padding: 10px; Two values with the frst value specifying the top and bottom padding and the second value specifying the left and right padding: 1em 1.5em; Three values with the frst value specifying the top padding, the second specifying the left and right padding and the third value specifying the bottom padding padding: 0.5em 0 1em; Four values specifying the padding in this order: top, right, bottom and left padding: 10px 10px 15px 10px; 16

17 Setting one padding at a time padding is a shorthand property for the padding-top, padding-right, padding-bottom and padding-left properties You can use these properties to set only the paddings you wish to set in a particular style rule. Like the padding property, these will accept absolute and relative values 17

18 Padding examples padding: 5px; padding: 1em auto; padding-left: 2em; Padding-right: 20%; padding-top: 1.5em; padding-bottom: 20px; 18

19 The reset selector If you want to have total control over your margins and padding, you can use the reset selector. This sets both the padding and margin to 0. Code * { margin: 0; padding: 0; } 19

20 Questions? 20

21 border-width border-width is a shorthand property that sets how wide to make the border. border-width can be set to an absolute or relative value as well as the keywords thin, medium and thick. Note: the width of the keywords thin, medium and thick vary between browsers. You can set one to four values for borderwidth to specify the top, right, bottom and left widths in the same formats as margin and padding 21

22 border-width examples border-width: 1px; border-width: thick; border-width: 0.25em 0.125em; 22

23 border-style border-style is a shorthand property that sets the style of the border border-style can be set to dotted, dashed, solid, double, groove, ridge, inset, outset and none. None is the default You can set one to four values for border-style to specify the top, right, bottom and left styles in the same formats as margin and padding 23

24 border-style examples border-style: solid; border-style: dashed; border-style: outset outset inset inset; 24

25 border-color border-color is a shorthand property that sets the color of the border border-color will accept a color value in any of the color formats we learned If you do not set border-color, the color of the border will match the font color property set for the element You can set one to four values for bordercolor to specify the top, right, bottom and left colors in the same formats as margin and padding 25

26 border-color examples border-color: #000000; border-color: teal; border-color: hsl(360, 50%, 20%); 26

27 border border is a shorthand property that allows you to set width, style and color in one declaration The format for the border property is border: [width] [style] [color]; Examples border: 1px solid blue; border: 2px dashed #000000; border: medium ridge; 27

28 Setting one border at a time You can set the top, right, bottom and left borders individually using the border-top, border-right, border-bottom and border-left shorthand properties respectively. The format for these properties is the same as border. You can also set the individual parts of an individual border using the border-<side>-<part> properties. The format for these properties are the same as their border-<part> counterpart Examples border-left-width: 2px; border-top-color: red; border-bottom-style: solid; 28

29 border-radius border-radius is a shorthand property that gives borders a rounded corner border-radius can accept absolute and relative values for how long to make the rounded corner. Border-radius has two formats One value to set all four radii to border-radius: 20px; Four values to set the top left, top right, bottom right and bottom left radii in that order border-radius: 1em 2em 3em 4em; 29

30 Setting one border-radius at a time You can set the top left, top right, bottom left and bottom right border radii individually using the bordertop-left-radius, border-top-rightradius, border-bottom-right-radius and border-bottom-left-radius properties respectively These properties can accept absolute and relative values. 30

31 border-radius examples border-radius: 50%; border-radius: 25px; border-radius: 0 20px 0 20px; border-top-left-radius: 1em; border-bottom-right-radius: 0; 31

32 box-shadow The box-shadow property adds a shadow the border of your box. box-shadow has the following format box-shadow: horizontal-ofset vertical-ofset [blur-radius] [spread] [color] Horizontal-ofset: how far left or right Vertical-ofset: how far up and down Blur-radius: how blurry to make the shadow Spread: how far the blur spreads Color: color of the shadow, defaults to the border color ** Although blur-radius and spread are optional, you cannot set spread without setting blur-radius 32

33 box-shadow continued The values for horizontal-ofset, vertical-ofset, blur-radius and spread can be absolute or relative values, excluding percent Examples box-shadow: 10px 10px; box-shadow: 5px 5px 2px blue; box-shadow: 5px -10px 2px 4px #33ddee; 33

34 Questions? 34

35 background-color The background-color property sets the background color for the content, padding and border sections of an element background-color will accept a color value in any of the color formats we learned as well as transparent. Transparent is the default. Do not use a background color that will make text on top of it hard to read. Examples background-color: green; background-color: rgb(230, 16, 135); 35

36 background-image The background-image property sets a background image for the content, padding and border sections of an element Background-image can be set to url() or none url() accepts relative and absolute URLS in between the parentheses Do not use a background image that will make text on top of it hard to read. Example background-image: url( images/wallpaper.png ); 36

37 background-repeat The background-repeat property sets if a background image should repeat and in which direction if the image is not large enough to cover the entire background of an element. background-repeat can be set to the keywords Repeat: repeat in both directions (this is the default) Repeat-x: repeat horizontally Repeat-y: repeat vertically No-repeat: do not repeat Example background-repeat: repeat-y; 37

38 background-attachment The background-attachment property specifes if a background image scrolls with the page or remains in a fxed position background-attachment can be set to scroll and fxed to have the image scroll or remain fxed respectively. The default is scroll Example background-attachment: fxed; 38

39 background-position The background-position property sets where in the element s background that the background image should be placed The format for the backgroundposition property is background-position: [horizontal-position] [vertical-position]; If either horizontal-position or vertical-position is omitted, it will default to center for the missing part. 39

40 background-position continued The values for horizontal-position can be The keywords left, center, right An absolute or relative value specifying how far from the left side of the element that the image should be positioned The value for vertical-position can be The keywords top, center and bottom An absolute or relative value specifying how far from the top of the element that the image should be positioned 40

41 background-position examples background-position: right top; background-position: bottom; background-position: 50px 50px; 41

42 background background is a shorthand property that lets you set the color, image, repeat, attachment and position values in one declaration The format for background is background: [color] [image] [repeat] [attachment] [position]; Examples: background: blue; background: black url( images/strips.png ); background: # url( bg.png ) repeat-y fxed top right; 42

43 linear-gradient() Another option for background-image is linear-gradient(). linear-gradient() will create a gradient using the colors you specify The format for linear-gradient is linear-gradient(direction, color-location, colorlocation[, color-location] ) 43

44 Linear-gradient() direction The direction can be set to To right: gradient going from left to right To left: gradient going from right to left To bottom: gradient going from top to bottom To top: gradient going from bottom to top <number>deg: to set a gradient that is slanted by a <number> of degrees 44

45 Linear-gradient() color-location linear-gradient() works by setting a series of color-locations and blending the colors between each color-location You must have at least two colorlocations to create a gradient however you can have more A color-location is in the format color % where color is the color we want and % is how far into the gradient we want the color to be. 45

46 linear-gradient() examples linear-gradient(to left, black 0%, white 100%) This places black at the start of the gradient and white at the end. The browser then gradually blends the colors from black to white linear-gradient(30deg, blue 0%, white 50%, yellow 100%) This places blue at the start, white in the middle and yellow at the end. Between blue and white, the browser gradually blends the colors from blue to white and between white and yellow, the browser gradually blends the colors from white to yellow. The entire gradient additionally slanted 30 degrees. 46

47 linear-gradient as a backgroundimage background-image: linear-gradient(to bottom, #f0000 0%, #00f00 50%, #0000f 100%); The book has a good example of setting background-image to stripes using linear-gradient 47

48 Questions? 48

CSS Box Model. Cascading Style Sheets

CSS Box Model. Cascading Style Sheets CSS Box Model Cascading Style Sheets CSS box model Background Width & height Margins & padding Borders Centering content Changing display type (block vs. inline) The Box Model Background Properties Property

More information

Client-Side Web Technologies. CSS Part II

Client-Side Web Technologies. CSS Part II Client-Side Web Technologies CSS Part II Topics Box model and related properties Visual formatting model and related properties The CSS Box Model Describes the rectangular boxes generated for elements

More information

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

Web Site Design and Development Lecture 9. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Web Site Design and Development Lecture 9 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Floating elements on a web page By default block elements fll the page from top to bottom and inline elements fll

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

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

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning Page Layout contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning 2 1 4.1

More information

ITNP43: HTML Lecture 5

ITNP43: HTML Lecture 5 ITNP43: HTML Lecture 5 1 The Box Model Every HTML element (e.g. h2, p etc) lies within a virtual box: Margin area LEFT TOP This is just some text that flows onto two lines. Border RIGHT Padding area BOTTOM

More information

Building Page Layouts

Building Page Layouts Building Page Layouts HTML & CSS From Scratch Slides 3.1 Topics Display Box Model Box Aesthetics Float Positioning Element Display working example at: h9ps://;nker.io/3a2bf Source: unknown. Please contact

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development Objectives INFS 2150 Introduction to Web Development 3. Page Layout Design Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 3. Page Layout Design Objectives Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

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

Internet Programming 1 ITG 212 / A

Internet Programming 1 ITG 212 / A Internet Programming 1 ITG 212 / A Lecture 10: Cascading Style Sheets Page Layout Part 2 1 1 The CSS Box Model top margin top border top padding left margin left border left padding Content right padding

More information

GoSquared Equally Rounded Corners Equally Rounded Corners -webkit-border-radius -moz-border-radius border-radius Box Shadow Box Shadow -webkit-box-shadow x-offset, y-offset, blur, color Webkit Firefox

More information

Assignments (4) Assessment as per Schedule (2)

Assignments (4) Assessment as per Schedule (2) Specification (6) Readability (4) Assignments (4) Assessment as per Schedule (2) Oral (4) Total (20) Sign of Faculty Assignment No. 02 Date of Performance:. Title: To apply various CSS properties like

More information

Web Design and Implementation

Web Design and Implementation Study Guide 3 - HTML and CSS - Chap. 13-15 Name: Alexia Bernardo Due: Start of class - first day of week 5 Your HTML files must be zipped and handed in to the Study Guide 3 dropbox. Chapter 13 - Boxes

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 6 IDM 221: Web Authoring I 2 The Box Model IDM 221: Web Authoring I 3 When a browser displays a web page, it places each HTML block element in a box.

More information

Cascading Style Sheets CSCI 311

Cascading Style Sheets CSCI 311 Cascading Style Sheets CSCI 311 Learning Objectives Learn how to use CSS to style the page Learn to separate style from structure Styling with CSS Structure is separated from style in HTML5 CSS (Cascading

More information

Web Site Design and Development Lecture 6

Web Site Design and Development Lecture 6 Web Site Design and Development Lecture 6 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Inheritance Before we talk about font properties, it needs to be known that font properties are inherited by the descendants

More information

Creating Layouts Using CSS. Lesson 9

Creating Layouts Using CSS. Lesson 9 Creating Layouts Using CSS Lesson 9 CSS Page Layout Advantages Greater typography control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control

More information

Parashar Technologies HTML Lecture Notes-4

Parashar Technologies HTML Lecture Notes-4 CSS Links Links can be styled in different ways. HTML Lecture Notes-4 Styling Links Links can be styled with any CSS property (e.g. color, font-family, background, etc.). a { color: #FF0000; In addition,

More information

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

TAG STYLE SELECTORS. div Think of this as a box that contains things, such as text or images. It can also just be a > > > > CSS Box Model Think of this as a box that contains things, such as text or images. It can also just be a box, that has a border or not. You don't have to use a, you can apply the box model to any

More information

Adding CSS to your HTML

Adding CSS to your HTML Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,

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 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

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

CSS3 Basics. From   & CSS Visual Dictionary Learning Curve Books, LLC CSS3 Basics From www.w3schools.com & CSS Visual Dictionary Learning Curve Books, LLC CSS Box Model Margin (top, right, bottom, left) Shorthand property, equivalent to Border-width border-style border-color

More information

The CSS Box Model. Motivation. CSS Box Model. CSE 190 M (Web Programming), Spring 2008 University of Washington

The CSS Box Model. Motivation. CSS Box Model. CSE 190 M (Web Programming), Spring 2008 University of Washington The CSS Box Model CSE 190 M (Web Programming), Spring 2008 University of Washington Reading: Chapter 2, sections Except where otherwise noted, the contents of this presentation are Copyright 2008 Marty

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

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container ITU 07204: Fundamentals of Web Technologies Lecture 6: CSS Layouts (Intro) Dr. Lupiana, D FCIM, Institute of Finance Management Semester 2 Agenda: CSS Layout (Box Model) 2 CSS Layout: Box Model All HTML

More information

HTML/XML. HTML Continued Introduction to CSS

HTML/XML. HTML Continued Introduction to CSS HTML/XML HTML Continued Introduction to CSS Entities Special Characters Symbols such as +, -, %, and & are used frequently. Not all Web browsers display these symbols correctly. HTML uses a little computer

More information

CS7026 CSS3. CSS3 Graphics Effects

CS7026 CSS3. CSS3 Graphics Effects CS7026 CSS3 CSS3 Graphics Effects What You ll Learn We ll create the appearance of speech bubbles without using any images, just these pieces of pure CSS: The word-wrap property to contain overflowing

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

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 4. Graphics and Images Objectives Create a figure box Add a background image Add a border to an element Create rounded borders Create a graphic border Create a

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development Objectives INFS 2150 Introduction to Web Development 4. Graphics and Images Create a figure box Add a background image Add a border to an element Create rounded borders Create a graphic border Create a

More information

CSS: Lists, Tables and the Box Model

CSS: Lists, Tables and the Box Model CSS: Lists, Tables and the Box Model CISC 282 September 20, 2017 Basics of CSS Style Name classes semantically What the style is intended for not what it does Define and apply styles efficiently Choose

More information

BORDER IMAGES THE BACKGROUND IMAGE PROPERTIES. Learning Web Design, 5e

BORDER IMAGES THE BACKGROUND IMAGE PROPERTIES. Learning Web Design, 5e BORDER IMAGES For use with: Learning Web Design, 5e by Jennifer Robbins Copyright O Reilly Media 2018 In this article, I ll give you a quick overview of the border-image properties for filling the sides

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

CSCU9B2: Web Tech Lecture 3

CSCU9B2: Web Tech Lecture 3 CSCU9B2: Web Tech Lecture 3 1 The Box Model Every HTML element (e.g. h2, p etc) lies within a virtual box: Margin area LEFT TOP This is just some text that flows onto two lines. Border RIGHT Padding area

More information

Responsive web design (RWD) CSS3 Media queries. Mobile vs desktop web sites. Web Development 1 CS1115/CS5002

Responsive web design (RWD) CSS3 Media queries. Mobile vs desktop web sites. Web Development 1 CS1115/CS5002 1 of 13 CS1115/CS5002 Web Development 1 Dr Derek Bridge School of Computer Science & Information Technology University College Cork Mobile vs desktop web sites A few organization have two web sites, one

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

IMY 110 Theme 6 Cascading Style Sheets

IMY 110 Theme 6 Cascading Style Sheets IMY 110 Theme 6 Cascading Style Sheets 1. Cascading Style Sheets 1.1. Cascading Style Sheets Up to now we have done styling by using the style attribute. e.g. paragraph What

More information

FLOATING AND POSITIONING

FLOATING AND POSITIONING 15 FLOATING AND POSITIONING OVERVIEW Understanding normal flow Floating elements to the left and right Clearing and containing floated elements Text wrap shapes Positioning: Absolute, relative, fixed Normal

More information

CSS for Designers. Capabilities to Know & Pitfalls to Avoid. R. Scott Granneman. Jans Carton

CSS for Designers. Capabilities to Know & Pitfalls to Avoid. R. Scott Granneman. Jans Carton CSS for Designers Capabilities to Know & Pitfalls to Avoid R. Scott Granneman Jans Carton 1.1 2009 R. Scott Granneman Last updated 2015-01-16 You are free to use this work, with certain restrictions. For

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

Web Site Design and Development Lecture 13

Web Site Design and Development Lecture 13 Web Site Design and Development Lecture 13 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Normalize.css Normalize.css is a useful project to incorporate into your web pages In their own words, Normalize.css

More information

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

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015 Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS 8 Oct 2015 What is CSS? o CSS (Style Sheet) defines how HTML elements are formatted and displayed. o It helps you easily change an HTML

More information

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 SUBJECT CODE : SCSV1223 (Section 05) SUBJECT NAME : WEB PROGRAMMING YEAR/COURSE : 1SCSV TIME : 2.00 4.00 PM DATE : 18 APRIL 2013 VENUE : KPU 10

More information

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

CSS: Layout Part 2. clear. CSS for layout and formatting: clear CSS: Layout Part 2 Robert A. Fulkerson College of Information Science and Technology http://www.ist.unomaha.edu/ University of Nebraska at Omaha http://www.unomaha.edu/ CSS for layout and formatting: clear

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

Graphic Design with CSS

Graphic Design with CSS Objectives Session 4.1 Create a figure box Add a background image Add a border to an element Create rounded borders Create a graphic border Tutorial 4 Session 4.2 Create a text shadow Create a box shadow

More information

Web Design and Development Tutorial 03

Web Design and Development Tutorial 03 Table of Contents Web Design & Development - Tutorial 03... 2 Using and Applying CSS to XHTML... 2 Conventions... 2 What you need for this tutorial... 2 Common Terminology... 3 Parent / Child Elements...

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

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

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

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

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

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

The Importance of the CSS Box Model

The Importance of the CSS Box Model The Importance of the CSS Box Model Block Element, Border, Padding and Margin Margin is on the outside of block elements and padding is on the inside. Use margin to separate the block from things outside

More information

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below) CSS Design and Layout Basic Exercise instructions You may want to bring your textbook to Exercises to look up syntax and examples. Have a question? Ask for help, or look at the book or lecture slides.

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

Table of Contents. MySource Matrix Content Types Manual

Table of Contents. MySource Matrix Content Types Manual Table of Contents Chapter 1 Introduction... 5 Chapter 2 WYSIWYG Editor... 6 Replace Text... 6 Select Snippet Keyword... 7 Insert Table and Table Properties... 8 Editing the Table...10 Editing a Cell...12

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

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

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

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 HTML & CSS. Instructor: Beck Johnson Week 2

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2 Introduction to HTML & CSS Instructor: Beck Johnson Week 2 today Week One review and questions File organization CSS Box Model: margin and padding Background images and gradients with CSS Make a hero banner!

More information

CMPT 165: More CSS Basics

CMPT 165: More CSS Basics CMPT 165: More CSS Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 14, 2011 1 The Favorites Icon The favorites icon (favicon) is the small icon you see

More information

Web Site Design and Development Lecture 24

Web Site Design and Development Lecture 24 Web Site Design and Development Lecture 24 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Useful CSS for forms Given the nature of form controls, they come with a lot of default styling but there are still

More information

Decorating with CSS. Cool Ways to Make Things Pretty. R. Scott Granneman. Jans Carton

Decorating with CSS. Cool Ways to Make Things Pretty. R. Scott Granneman. Jans Carton Decorating with CSS Cool Ways to Make Things Pretty R. Scott Granneman Jans Carton 1.4 2013 R. Scott Granneman Last updated 2015-01-14 You are free to use this work, with certain restrictions. For full

More information

Fish Eye Menu DMXzone.com Fish Eye Menu Manual

Fish Eye Menu DMXzone.com Fish Eye Menu Manual Fish Eye Menu Manual Page 1 of 33 Index Fish Eye Menu Manual... 1 Index... 2 About Fish Eye Menu... 3 Features in Detail... 4 Integrated in Dreamweaver... 6 Before you begin... 7 Installing the extension...

More information

Web Dialogue and Child Page

Web Dialogue and Child Page Web Dialogue and Child Page Create date: March 3, 2012 Last modified: March 3, 2012 Contents Introduction... 2 Parent Page Programming... 2 Methods... 2 ShowChildDialog... 2 ShowChildWindow... 4 ShowPopupWindow...

More information

More CSS. <link href="filename" type="text/css" rel="stylesheet" /> CS380

More CSS. <link href=filename type=text/css rel=stylesheet /> CS380 1 More CSS HTML id attribute 2 coding Horror! Coding Horror! our mission is to combine programming and human factors

More information

Work with Shapes. Concepts CHAPTER. Concepts, page 3-1 Procedures, page 3-5

Work with Shapes. Concepts CHAPTER. Concepts, page 3-1 Procedures, page 3-5 3 CHAPTER Revised: November 15, 2011 Concepts, page 3-1, page 3-5 Concepts The Shapes Tool is Versatile, page 3-2 Guidelines for Shapes, page 3-2 Visual Density Transparent, Translucent, or Opaque?, page

More information

Using CSS for page layout

Using CSS for page layout Using CSS for page layout Advantages: Greater typographic control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control Increased accessibility

More information

CASCADING STYLESHEETS

CASCADING STYLESHEETS CASCADING STYLESHEETS Cascading StyleSheets (CSS) has been mainly created because HTML is just not the right tool for precision and flexibility. HTML is not a very effective for designing web pages. Most

More information

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

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

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

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What

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

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

Module 2 (VII): CSS [Part 4]

Module 2 (VII): CSS [Part 4] INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 2 (VII): CSS [Part 4] Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals

More information

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

<style type=text/css> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page*** Chapter 7 Using Advanced Cascading Style Sheets HTML is limited in its ability to define the appearance, or style, across one or mare Web pages. We use Cascading style sheets to accomplish this. Remember

More information

Lab 1: Introducing HTML5 and CSS3

Lab 1: Introducing HTML5 and CSS3 CS220 Human- Computer Interaction Spring 2015 Lab 1: Introducing HTML5 and CSS3 In this lab we will cover some basic HTML5 and CSS, as well as ways to make your web app look and feel like a native app.

More information

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

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Horizontal Rule Element Web Development & Design Foundations with HTML5 Ninth Edition Chapter 4 Visual Elements and Graphics Learning Objectives (1 of 2) 4.1 Create and format lines and borders on web pages 4.2 Apply the image

More information

Certified CSS Designer VS-1028

Certified CSS Designer VS-1028 VS-1028 Certification Code VS-1028 Certified CSS Designer Certified CSS Designer CSS Designer Certification requires HTML knowledge or VSkills HTML Designer Certification to allow organizations to easily

More information

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources HTML + CSS ScottyLabs WDW OVERVIEW What are HTML and CSS? How can I use them? WHAT ARE HTML AND CSS? HTML - HyperText Markup Language Specifies webpage content hierarchy Describes rough layout of content

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

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster. Wanted! Introduction In this project, you ll learn how to make your own poster. Step 1: Styling your poster Let s start by editing the CSS code for the poster. Activity Checklist Open this trinket: jumpto.cc/web-wanted.

More information

Cascading Style Sheets (Part II)

Cascading Style Sheets (Part II) Cascading Style Sheets (CSSs) (Part II) Page Layout with Styles...1 Offsetting Elements...1 Positioning Elements Absolutely...3 Positioning Elements in 3D...4 Displaying and Hiding Elements...5 Setting

More information

IBM Forms V8.0 Custom Themes IBM Corporation

IBM Forms V8.0 Custom Themes IBM Corporation IBM Forms V8.0 Custom Themes Agenda 2 Overview Class Names How to Use Best Practice Styling Form Items Test Custom CSS Sample Overview 3 To create custom theme you must be familiar with the basic concept

More information

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

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model Unit 20 - Client Side Customisation of Web Pages Week 2 Lesson 4 The Box Model So far Looked at what CSS is Looked at why we will use it Used CSS In-line Embedded (internal style-sheet) External

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

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

Web Programming Step by Step

Web Programming Step by Step Web Programming Step by Step Lecture 5 Floating and Positioning Reading: 4.3-4.5 Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. 4.3:

More information

3. Each of these mark examples contains an error. a. <input name= country value= Your country here. /> b. <checkbox name= color value= teal />

3. Each of these mark examples contains an error. a. <input name= country value= Your country here. /> b. <checkbox name= color value= teal /> 1. Decide whether each of these forms should be sent via the GET or POST method: A form for accessing your bank account online A form for sending t-shirt artwork to the printer A form for searching archived

More information

/* ========================================================================== PROJECT STYLES

/* ========================================================================== PROJECT STYLES html { box-sizing: border-box; *, *:before, *:after { box-sizing: inherit; img { max-width: 100%; border: 0; audio, canvas, iframe, img, svg, video { vertical-align: middle; /* Remove gaps between elements

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

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

Cascading Style Sheets

Cascading Style Sheets 4 TVEZEWXYHMNR LSTVSKVEQY-RJSVQEXMOENITSHTSVSZ RETVSNIOXIQ RERGSZER Q^)ZVSTWO LSWSGM PR LSJSRHYEVS^TS XYLPEZR LSQ WXE4VEL] 4VELE)9-RZIWXYNIQIHSZE% FYHSYGRSWXM CSS Cascading Style Sheets Lukáš Bařinka barinkl@fel.cvut.cz

More information