Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.

Slides:



Advertisements
Similar presentations
Chapter 6 More CSS Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Advertisements

Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
Tutorial 4: Creating page layout with css
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
CSS Color & Text Cascading Style Sheets. Advantages of CSS Typography and page layout can be better controlled Style is separate from structure Documents.
CIS 1310 – HTML & CSS 4 Visual Elements and Graphics.
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Web Development & Design Foundations with HTML5
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Tutorial 3 Working with Cascading Style Sheets. XP Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external.
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
Cascading Style Sheets Billy Toy Cascading Style Sheets Syntax review How to Implement style sheets Background properties Text properties.
CSS Typography, Fonts, Spacing, Borders, Backgrounds, Opacity
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
CHAPTER 3 CSS & CSS3 อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
COMP213 – Web Interface Design
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets Part 3 Spring, 2008 Modified by Linda Kenney April 21, 2008.
Web Foundations THURSDAY, OCTOBER 3, 2013 LECTURE 6: CSS CONTINUED.
>> The “Box” Model. Pre-requisite Create a new project in Netbeans called Week5 Create a new html file and name it box.html Create a new css file and.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
CSS Presentation CSS Typography, Fonts, Spacing, Borders, Backgrounds, Opacity Svetlin Nakov Technical Trainer Software University
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
CSS – Cascading Style Sheets
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
JavaScript and CSS
Review First – on your own... Go to Day 5 Grab the contents of position review file Place in DW Add styles to recreate – get something close to
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Web Development & Design Foundations with HTML5 8th Edition
Chapter 6 More CSS Basics Key Concepts
4 Visual Elements and Graphics.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
CSS Borders and Margins.
Box model, spacing, borders, backgrounds
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Web Development & Design Foundations with H T M L 5
How to use the CSS box model for spacing, borders, and backgrounds
Presentation transcript:

Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1

Learning Outcomes Configure text typeface, size, weight, and style with CSS Align and indent text with CSS Describe and apply the CSS Box Model Configure width and height with CSS Configure margin, border, and padding with CSS Center web page content with CSS Apply shadows with CSS3 Configure rounded corners with CSS3 Configure background images with CSS3 Configure opacity, RGBA color, HSLA color and gradients with CSS3 2

Configure Typeface with CSS font-family property – Configures the font typeface of the text – Include a generic family name p { font-family: Verdana, Arial, sans-serif; }

Configure Text Size, Weight, and Style with CSS – font-size property Configures the size of the text – font-weightproperty Configures the boldness of text – font-style property Configures the style of the text – line-height property Modifies the height of a line of text p { font-size: 90%: } li {font-weight: bold; } #footer { font-style: italic; } p { line-height: 120%; }

The font-size Property Accessibility Recommendation: ◦ Use em or percentage font sizes – these can be easily enlarged in all browsers by users

Align and Indent Text with CSS – text-transform property Configures the capitalization of text – text-align property Configures the alignment of text – text-indent property Configures the indentation of the first line of text in an element h1 { text-transform: uppercase; } p { text-indent: 5em; } h1 { text-align: center; }

Configure Width and Height with CSS – width property Configures the width of an element’s content – min-width property Configures minimum width of an element – max-width property Configures the maximum width of an element – height property Configures the height of an element h1 { width: 80%; } h1 { height: 100px; }

The Box Model Content – Text & web page elements in the container Padding – Area between the content and the border Border – Between the padding and the margin Margin – Determines the empty space between the element and adjacent elements 8

Configure Margin with CSS – The margin property – Related properties: margin-top, margin-right, margin-left, margin-bottom – Configures empty space between the element and adjacent elements – Syntax examples h1 { margin: 0; } h1 { margin: 20px 10px; } h1 { margin: 10px 30px 20px; } h1 { margin: 20px 30px 0 30px; }

Configure Padding with CSS – The padding property – Related properties: padding-top, padding-right, padding-left, padding-bottom – Configures empty space between the content of the HTML element (such as text) and the border – Syntax examples h1 { padding: 0; } h1 { padding : 20px 10px; } h1 { padding : 10px 30px 20px; } h1 { padding : 20px 30px 0 30px; }

The CSS border Property Configures a border on the top, right, bottom, and left sides of an element Consists of – border-width – border-style – border-color h2 { border: 2px solid #ff0000 }

Browser Display Can Vary

Configuring Specific Sides of a Border Use CSS to configure a line on one or more sides of an element – border-bottom – border-left – border-right – border-top h2 { border-bottom: 2px solid #ff0000 }

CSS3 Rounded Corners border-radius property 90 px would be a half circle. Example: h1 { border: 1px solid #000033; border-radius: 15px; } 14

Centering Page Content with CSS #container { margin-left: auto; margin-right: auto; width:80%; } One of my most used CSS properti es Except I usually use 900px here

CSS3 box-shadow Property Configure the horizontal offset, vertical offset, blur radius, and valid color value Example: #wrapper { box-shadow: 5px 5px 5px #828282;} Note: Optional keyword: inset (inner shadow) 16

CSS3 text-shadow Property Configure the horizontal offset, vertical offset, blur radius, and valid color value Example: #wrapper { text-shadow: 3px 3px 3px #666; } 17

CSS3 Background Image Properties background-clip – confines the display of the background image background-origin – positions the background image relative to the content, padding or boder background-size – can be used to resize or scale the background image What’s its relative to 18

CSS3 opacity Property Configure the opacity of the background color Opacity range: – 0 Completely Transparent – 1 Completely Opaque horizontal offset, vertical offset, blur radius, and valid color value Example: h1{ background-color: #FFFFFF; opacity: 0.6; } 19

RGBA Color Four values are required: red color, green color, blue color, and alpha(transparency) – The values for red, green, and blue must be decimal values from 0 to 255. – The alpha value must be a number between 0 (transparent) and 1 (opaque). Example: h1 { color: #ffffff; color: rgba(255, 255, 255, 0.7); font-size: 5em; padding-right: 10px; text-align: right; font-family: Verdana, Helvetica, sans-serif; } 20

HSLA Color hue, saturation, light, alpha Hue is a value between 0 and 360 (basically break all colors between 0 →360 Saturation: percent (intensity, gray added) Lightness: percent (brightness vs. darkness) Optional alpha: from 0 to 1 21

CSS3 Gradients Gradient: a smooth blending of shades from one color to another Use the background-image property – linear-gradient() – radial-gradient() Example: (look at page 189) not fully supported write a line for each browser: background-color: #8FA5CE; background-image: -webkit-linear-gradient(top, #FFFFFF, #8FA5CE); background-image: -moz-linear-gradient(top, #FFFFFF, #8FA5CE); filter: progid:DXImageTransform.Microsoft.gradient (startColorstr=#FFFFFFFF, endColorstr=#FF8FA5CE); linear-gradient(#FFFFFF, #8FA5CE); 22

Summary This chapter expanded your CSS skillset. You configured text with CSS properties. You were introduced to the box model. You configured CSS properties related to the box model, such as margin, border, padding, and width. You centered a web page using CSS. You explored new CSS3 properties including: border-radius, box-shadow, text-shadow, opacity. 23