HTML, CSS, and XML Tutorial 8 Enhancing a Web Site with Advanced CSS.

Slides:



Advertisements
Similar presentations
Working with Web Tables
Advertisements

Chapter 6 More CSS Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Tutorial 6 Creating a Web Form
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
CSS level 3. History of CSS CSS level 1 – original CSS CSS level 2 CSS level 2 Revision 1 (CSS2.1) – up to CSS2.1 monolithic structure CSS level 3 – specification.
Creating Special Effects with CSS
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Tutorial 4 Creating Special Effects with CSS
Using HTML Tables.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
RESPONSIVE DESIGN Sources: Kadlec, T. (2012). Implementing responsive design. Berkeley, California: New Riders Publishing. MarcotteMarcotte, E. (2010).
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
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.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
Principles of Web Design 6 th Edition Chapter 7 – Page Layouts.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
INTRODUCTION TO HTML5 Styling with CSS3. Round Border Corners  You can modify any element that supports the border property and render rounded borders.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
XP Tutorial 12 New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
Tutorial 8 Enhancing a Web Site with Advanced CSS
Tutorial 5 Working with Tables and Columns
Tutorial 5 Working with Tables and Columns
COMP213 – Web Interface Design
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 14: Enhancements and Effects with CSS3.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
Positioning and Printing Creating Special Effects with CSS.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
INFO1300 LAB7 OCT.11TH RESPONSIVE DESIGN. WHAT IS RESPONSIVE WEB DESIGN A mix of flexible grids and layouts, images and an intelligent use of CSS media.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
Tutorial 4 Creating Page Layouts with CSS
XP Tutorial 5 New Perspectives on JavaScript, Comprehensive1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
Cascading Style Sheets CSS2 - a bit more advanced.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
Web Design (17) CSS Box Element (2). ‘Box’ Web Site (1) Insert a navigation bar into the index.html file and create links to ‘index.html’, ‘pageone.html’
CSS.
Working with Cascading Style Sheets
Formatting Text with CSS
Chapter 5 Introduction to Cascading Style Sheets (CSS): Part 2
Tutorial 4 Topic: CSS 3.0 Li Xu
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Advanced CSS BIS1523 – Lecture 20.
Objectives Create a media query Work with the browser viewport
Responsive Design.
Chapter 6 More CSS Basics Key Concepts
Objectives Create a reset style sheet Explore page layout designs
Objectives Create a figure box Add a background image
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
Tutorial 4 Creating Special Effects with CSS
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

HTML, CSS, and XML Tutorial 8 Enhancing a Web Site with Advanced CSS

XP Objectives Create text and box shadows Work with IE filters Rotate an object using CSS3 Create linear gradients Apply a border image Set the opacity of a page object New Perspectives on HTML, CSS, and XML, 4th Edition2

XP Objectives Apply a style to a media device Create and apply print styles Define the visual viewport Create a media query Create styles for mobile devices in portrait and landscape mode New Perspectives on HTML, CSS, and XML, 4th Edition3

XP Visual Effects with CSS3 New Perspectives on HTML, CSS, and XML, 4th Edition4

XP Creating Drop Shadows with CSS3 To create a text shadow, apply the style text-shadow: color offsetX offsetY blur; where color is the color of the shadow, offsetX and offsetY are the displacements of the shadow from the text in the horizontal and vertical directions, and blur is the size of the blurring effect. New Perspectives on HTML, CSS, and XML, 4th Edition5

XP Creating Drop Shadows with CSS3 To apply a drop shadow to a page element, use the style box-shadow: [inset] color offsetX offsetY blur [spread]; where the optional inset keyword places the shadow within the object, and the optional spread value increases or decreases the size of the shadow relative to the size of the object. New Perspectives on HTML, CSS, and XML, 4th Edition6

XP Creating Drop Shadows with CSS3 New Perspectives on HTML, CSS, and XML, 4th Edition7

XP Creating Drop Shadows with CSS3 New Perspectives on HTML, CSS, and XML, 4th Edition8

XP Introducing Internet Explorer Filters New Perspectives on HTML, CSS, and XML, 4th Edition9

XP Applying an Internet Explorer Filter To apply an Internet Explorer filter, add the style – filter: progid:DXImageTransform.Microsoft. filter(param); where filter is the name of an Internet Explorer visual effect, and param is the parameters that apply to that effect New Perspectives on HTML, CSS, and XML, 4th Edition10

XP Applying an Internet Explorer Filter To apply an Internet Explorer filter in compliance with correct CSS syntax, add the following style: -ms-filter: “progid:DXImageTransform.Microsof t.filter(param)”; New Perspectives on HTML, CSS, and XML, 4th Edition11

XP Rotating an Object Styles that modify the placement or orientation of a page object are organized under the transform style transform: effect(params); where effect is the transformation function that will be applied to the object, and params are any parameters required by the transformation New Perspectives on HTML, CSS, and XML, 4th Edition12

XP Rotating an Object New Perspectives on HTML, CSS, and XML, 4th Edition13

XP Transformations in Three Dimensions New Perspectives on HTML, CSS, and XML, 4th Edition14

XP Applying a Color Gradient To create a linear gradient, apply the function linear-gradient(position || angle, color-stop, color-stop, …) where position is the starting point of the gradient using the keywords left, right, top, and bottom ; angle is the angle of the gradient; and color-stop is the position and color of each color (entered as color position ). New Perspectives on HTML, CSS, and XML, 4th Edition15

XP Applying a Color Gradient To create a radial gradient, apply the function radial-gradient(center, shape size, color-stop, color-stop, …) where center is the position of the radial gradient’s center, shape is the gradient’s shape, size is the size of the gradient, color is the initial color at the center, and color- stop is a color and its position within the radial gradient. New Perspectives on HTML, CSS, and XML, 4th Edition16

XP Applying a Color Gradient To create a linear gradient in WebKit, apply the function -webkit-gradient(linear, start, stop, from(color), colorstop(percent, color), to(color)) where start provides the starting location of the gradient, stop defines the gradient’s stopping location, color is a color value or color name, and the color-stop() function identifies the location and color of an intermediate color in the gradient. New Perspectives on HTML, CSS, and XML, 4th Edition17

XP Applying a Color Gradient To create a radial gradient in WebKit, apply the function -webkit-gradient(radial, inner- center, inner-radius, outer-center, outer-radius, from(color), color- stop(percent, color), to(color)) where inner-center and outer-center set the centers of the first and last color in the color list, respectively; inner-radius sets the endpoint of the first color; and outer-radius sets the starting point of the last color. New Perspectives on HTML, CSS, and XML, 4th Edition18

XP Applying a Color Gradient To create a linear gradient in Internet Explorer, apply the filter Gradient(gradientType=type, startColorStr=#rrggbb, endColorStr=#rrggbb) where type is either 0 for a vertical gradient or 1 for a horizontal gradient, startColorStr indicates the starting color, and endColorStr indicates the ending color New Perspectives on HTML, CSS, and XML, 4th Edition19

XP Designing for Printed Media New Perspectives on HTML, CSS, and XML, 4th Edition20

XP Applying a Border Image To use a graphic image as an element border, apply the style border-image: url(url) slice repeat; where url is the source of the border image file, slice is the size of the slice cut from the border image file, and repeat indicates whether the border slices should be stretched to cover the object’s four sides or tiled New Perspectives on HTML, CSS, and XML, 4th Edition21

XP Applying a Border Image New Perspectives on HTML, CSS, and XML, 4th Edition22

XP Creating Semi-Transparent Objects To create a semi-transparent object, apply the style opacity: value; where value ranges from 0 (completely transparent) up to 1 (completely opaque). To create a semi-transparent object under Internet Explorer version 8 or earlier, apply the filter Alpha(opacity=value) where value ranges from 0 (completely transparent) up to 100 (completely opaque). New Perspectives on HTML, CSS, and XML, 4th Edition23

XP Creating Semi-Transparent Objects New Perspectives on HTML, CSS, and XML, 4th Edition24

XP Working with Different Media Devices To create a style sheet for a specific media device, add the attribute media = “devices” to either the link element or the style element, where devices is one or more of braille, embossed, handheld, print, projection, screen, speech, tty, tv, or all. If you don’t specify a media device, the style sheet applies to all devices. Multiple media types should be entered in a comma-separated list New Perspectives on HTML, CSS, and XML, 4th Edition25

XP Working with Different Media Devices To create a style for specific media from within a style sheet, add the devices {styles} where styles is the style rules that are applied to the different page elements displayed by those media devices New Perspectives on HTML, CSS, and XML, 4th Edition26

XP Using Print Styles To define a page box for a printout that indicates the page size, margins, and orientation, use the style {styles} where styles is the styles that define the page. New Perspectives on HTML, CSS, and XML, 4th Edition27

XP Using Print Styles To set the page size and orientation, use the style property size: width height orientation; where width and height are the width and height of the page, and orientation is the orientation of the page ( portrait or landscape ). New Perspectives on HTML, CSS, and XML, 4th Edition28

XP Setting Page Breaks To insert a page break before an element, use the style property page-break-before: type; where type is to always place a page break, avoid to never place a page break, left to force a page break where the succeeding page will be a left page, right to force a page break where the succeeding page will be a right page, auto to allow browsers to determine whether or not to insert a page break, or inherit to inherit the page break style of the parent element. New Perspectives on HTML, CSS, and XML, 4th Edition29

XP Setting Page Breaks To insert a page break after an element, use the property page-break-after: type; where type has the same values as the page- break-before style. To apply a page break inside an element, use the property page-break-inside: type; where type is auto, inherit, or avoid. New Perspectives on HTML, CSS, and XML, 4th Edition30

XP Designing for the Mobile Web New Perspectives on HTML, CSS, and XML, 4th Edition31

XP Designing for the Mobile Web New Perspectives on HTML, CSS, and XML, 4th Edition32

XP Testing a Mobile Design New Perspectives on HTML, CSS, and XML, 4th Edition33

XP Configuring the Viewport Mobile devices can display pages written for the larger screens found on desktop computers The contents of a Web page are displayed within a window known as the viewport – Visual viewport – Layout viewpot New Perspectives on HTML, CSS, and XML, 4th Edition34

XP Introducing Media Queries To create a media query for loading a style sheet, add the media attribute media = “devices and|or (features)” to the link element, where devices is a list of media devices, and features is a list of display features and their values as found on those devices New Perspectives on HTML, CSS, and XML, 4th Edition35

XP Introducing Media Queries To apply a media query to a collection of style rules, apply devices and|or (features) { styles } in your style sheet, where styles is those styles applied to the specified devices and features. To import a style sheet based on a media query, apply the url(url) devices and|or (features) New Perspectives on HTML, CSS, and XML, 4th Edition36

XP Introducing Media Queries To associate a style sheet with screen devices that are less than or equal to a specific width, use the query media = “screen and (max-width: value)” where value is the maximum allowable width of the screen’s viewport To associate a style sheet with screen devices that are greater than or equal to a specific width, use the query media = “screen and (min-width: value)” where value is the minimum allowable width of the screen’s viewport. New Perspectives on HTML, CSS, and XML, 4th Edition37

XP Introducing Media Queries To associate a style sheet with screen devices that fall within a range of screen widths, use the following query: media = “screen and (min-width: value and max-width: value)” To associate a style sheet with screen devices in portrait or landscape mode, use the query media = “screen and (orientation: type)” where type is either portrait or landscape. New Perspectives on HTML, CSS, and XML, 4th Edition38

XP Creating a Mobile Style Sheet New Perspectives on HTML, CSS, and XML, 4th Edition39

XP Designing for Portrait Orientation New Perspectives on HTML, CSS, and XML, 4th Edition40

XP Designing for Landscape Orientation New Perspectives on HTML, CSS, and XML, 4th Edition41