Chapter 6 More CSS Basics Key Concepts

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

Chapter 6 More CSS Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Unit 20 - Client Side Customisation of Web Pages
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
CIS 1310 – HTML & CSS 4 Visual Elements and Graphics.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
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 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial 8 Enhancing a Web Site with Advanced CSS
COMP213 – Web Interface Design
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.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
WebD Introduction to CSS By Manik Rastogi.
CSS.
Laying out Elements with CSS
Web Development & Design Foundations with HTML5 8th Edition
Cascading Style Sheets Boxes
( Cascading style sheet )
Google fonts CSS box model
CSS Layouts: Grouping Elements
CSS Rule Selector Declaration Block Value Attribute Name body {
CSS3 Style of the HTML document CSS2+New Specifications Differences
Web Development & Design Foundations with HTML5 8th Edition
Tutorial 4 Topic: CSS 3.0 Li Xu
CS1220 Web Programming Saloni Chacha.
>> The “Box” Model
Box model.
CSS3 Cascading Style Sheet
Web Systems & Technologies
BOX DIMENSIONS width, height div { height: 300px; width: 400px; background-color: #ee3e80;} p { height: 75%; width: 75%; background-color:
Chapter 4 Visual Elements And Graphics Part II
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 7th Edition
Cascading Style Sheets
Web Development & Design Foundations with HTML5 8th Edition
Objectives Create a figure box Add a background image
4 Visual Elements and Graphics.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
The Internet 10/13/11 The Box Model
CSS Borders and Margins.
CSS Box Model.
HTML5 Level I Session III
HTML5 Level I Session III
Box model, spacing, borders, backgrounds
Cascading Style Sheets
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with H T M L 5
SEEM4570 Tutorial 3: CSS + CSS3.0
Web Development & Design Foundations with H T M L 5
How to use the CSS box model for spacing, borders, and backgrounds
CSS and Class Tools.
CS3220 Web and Internet Programming More CSS
CS3220 Web and Internet Programming More CSS
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

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

Learning Outcomes 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 Apply CSS3 properties to background images Configure opacity, RGBA color, HSLA color, and gradients with CSS3

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 maximum width of an element height property Configures the height of an element h1 { width: 80%; } h1 { height: 100px; }

The Box Model Content Padding Border Margin 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

Configure Margin with CSS The margin property Related properties: margin-top, margin-right, margin-bottom, margin-left 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-bottom, padding-left 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 }

Valid border-style Values

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 Example: h1 { border: 1px solid #000033; border-radius: 15px; }

Centering Page Content with CSS <body> <div id=“container”> ..page content goes here… </div> </body> #container { margin-left: auto; margin-right: auto; width: 80%; }

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

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

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

CSS3 opacity Property Configure the opacity of the background color Opacity range: 0 Completely Transparent 1 Completely Opaque Example: h1{ background-color: #FFFFFF; opacity: 0.6; }

RGBA Color Four values are required: Example: 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.8); font-size: 5em; padding-right: 10px; text-align: right; font-family: Verdana, Helvetica, sans-serif; }

HSLA Color hue, saturation, light, alpha Hue: value between 0 and 360 Saturation: percent Lightness: percent Optional alpha: from 0 to 1 hsla(210, 100%, 25%, 1.0);

CSS3 Gradients Linear Gradient Radial Gradient Gradient: a smooth blending of shades from one color to another Use the background-image property Linear Gradient Example: body { background-color: #8FA5CE; background-image: linear-gradient (to bottom, #FFFFFF, #8FA5CE); } Radial Gradient background-image: radial-gradient(#FFFFFF, #0000FF);

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