Understanding CSS Essentials: Content Flow, Positioning, and Styling

Slides:



Advertisements
Similar presentations
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Advertisements

1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
 CSS Presentation and layout is based on the CSS Box Model.  The CSS Box Model states that every element on a page is a rectangular box.  This includes:
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
4.01 Cascading Style Sheets
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
The Characteristics of CSS
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
IS 360 Declaring CSS Styles. Slide 2 Introduction Learn about the three ways to declare a style Inline / embedded / external Learn about the effect of.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
A really fairly simple guide to: mobile browser-based application development (part 2, CSS) Chris Greenhalgh G54UBI / Chris Greenhalgh
Cascading Style Sheets
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Microsoft Expression Web 3 – Illustrated Unit F: Enhancing a Design with CSS.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
MTA EXAM HTML5 Application Development Fundamentals.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 6.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Agenda Cascading Style Sheets Selectors and Declarations Fonts and Font Families Content Flow Positioning Content Overflow.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 8.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
CSS.
Working with Cascading Style Sheets
Web Development & Design Foundations with HTML5 7th Edition
4.01 Cascading Style Sheets
IS 360 Declaring CSS Styles
Intro to CSS CS 1150 Fall 2016.
Introduction to web design discussing which languages is used for website designing
Web Development & Design Foundations with HTML5 8th Edition
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Intro to CSS CS 1150 Spring 2017.
Web Development & Design Foundations with HTML5 8th Edition
Tutorial 3 Working with Cascading Style Sheets
Floating and Positioning
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
4.01 Cascading Style Sheets
Presentation transcript:

Understanding CSS Essentials: Content Flow, Positioning, and Styling Lesson 4

Exam Objective Matrix Skills/Concepts MTA Exam Objectives Understanding CSS Essentials Understand the core CSS concepts. (3.1) Tip: Add your own speaker notes here.

Presentation vs. Content Content is the words and images in an HTML document. Presentation is related to styles and how words and images "look" in an HTML document. Content is managed as HTML and style as CSS. The separation of HTML and CSS generally means keeping CSS styles in a file separate from the HTML file. Tip: Add your own speaker notes here.

Web Page with and without CSS Tip: Add your own speaker notes here.

CSS = Cascading Style Sheets CSS is a sequence of rules. CSS3 is the latest draft version; corresponds to HTML5 CSS3 is that it’s backward compatible with previous versions of CSS, Tip: Add your own speaker notes here.

The Link Between HTML and CSS The <link> element in an HTML file links the HTML file to a CSS file. You can reference more than one CSS file in an HTML page. Markup example: <link href = "filename.css" rel = "stylesheet" type = "text/css"> For simple projects, can use the <style> tag to include styles within an HTML document Tip: Add your own speaker notes here.

CSS Selector and Declaration The selector is usually the HTML element you want to style. The declaration is the style for a specific selector. A declaration has a property, which is a style attribute, and a value. Selector Declaration Tip: Add your own speaker notes here. p {color: brown;} Property Value

Styled Web Page Example: HTML File Tip: Add your own speaker notes here.

Styled Web Page Example: CSS File Tip: Add your own speaker notes here.

Styled Web Page Example: Rendered Page Tip: Add your own speaker notes here.

A font is a set of characters of a particular size and style. Font Basics A font is a set of characters of a particular size and style. Examples: Times New Roman Eras Bold ITC Myriad Web Pro Monospace is often used for technical material such as formulas, numbers, codes, and so on. Tip: Add your own speaker notes here.

Serif and Sans Serif Fonts d p t d p t Tip: Add your own speaker notes here.

Font Families The primary way to specify fonts in a CSS file is to use the font-family property. The property can declare a specific font, like Garamond or Arial, or a family that includes many different fonts, such as “serif.” Examples: font-family: Arial font-family: serif Tip: Add your own speaker notes here.

Fonts most likely installed on a Web page visitor’s system Web-safe Fonts Fonts most likely installed on a Web page visitor’s system List of Web-safe fonts is relatively short and doesn’t offer much variety Tip: Add your own speaker notes here.

@font-face Rule CSS3 rule that enables developers to use any font they choose Create a font-face rule by assigning a name to the font Font must be located on your Web server, or include a URL to font location Example: @font-face { font-family: TrustyHomePage; src: url('Euphemia.ttf'), } Tip: Add your own speaker notes here.

Inline Flow and Block Flow Inline flow fills only as much width as required Block flow fills as much width as is available Tip: Add your own speaker notes here.

Block Flow Example Tip: Add your own speaker notes here.

Block Flow Example Tip: Add your own speaker notes here.

Update the style section of the HTML file as follows: Inline Flow Example Update the style section of the HTML file as follows: Tip: Add your own speaker notes here.

Inline Flow Example Tip: Add your own speaker notes here.

Float vs. Absolute Positioning Float positioning Is useful when a layout is in columns, at least in part To float an element is to have it move as far as possible either to the right or left Text “wraps” around the element Absolute positioning More exact and uses geometric placement Tip: Add your own speaker notes here.

Float Positing Example Tip: Add your own speaker notes here.

Float Positing Example Tip: Add your own speaker notes here.

Absolute Positioning Example Tip: Add your own speaker notes here.

Absolute Positing Example Tip: Add your own speaker notes here.

Bounding box can be visible or invisible. A bounding box is a rectangular border around content -- text, an image, or a shape -- that enables you to move, rotate, or scale the content of the box. Bounding box can be visible or invisible. Tip: Add your own speaker notes here.

Visible overflow writes over the content that follows it. When an element overflows its bounding box, and its overflow is set to scroll, all the content of the element stays within the box; none of the overflow appears outside the box. This is referred to as scrolling overflow. Visible overflow writes over the content that follows it. Hidden overflow makes overflow invisible. Tip: Add your own speaker notes here.

Overflow Values: overflow property Scroll Visible Hidden Tip: Add your own speaker notes here.

Scrolling Overflow Example Tip: Add your own speaker notes here.

Scrolling Overflow Example Tip: Add your own speaker notes here.

Visible Overflow Example Tip: Add your own speaker notes here.

Visible Overflow Example Tip: Add your own speaker notes here. Visible overflow

Hidden Overflow Example Tip: Add your own speaker notes here.

Hidden Overflow Example Tip: Add your own speaker notes here.

Recap Presentation versus content CSS basics The link between HTML and CSS CSS selector and declaration Fonts and font families Web-safe fonts and @font-face rule Inline flow and block flow Float and absolute positioning Overflow