IMAGES Controlling size of images in CSS Aligning images in CSS Adding background images.

Slides:



Advertisements
Similar presentations
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Ideas to Layout Beginning web layout using Cascading Style Sheets (CSS). Basic ideas, practices, tools and resources for designing a tableless web site.
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
New Semantic Elements (Part 2)
Tutorial 4: Creating page layout with css
Tutorial 5 Working with the Box Model. XP Objectives Understand the box model Create padding, margins, and borders Wrap text around an image Float a block-level.
Tutorial 6 Creating Fixed-Width Layouts
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
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.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Cascading Style Sheets 1 Color and Backgrounds. Cascading Style Sheets 2 Color and Backgrounds Computer color basics Expression of color values using.
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.
Cascading style sheets (CSS)
Principles of Web Design 6 th Edition Chapter 7 – Page Layouts.
ITP 104.  While you can do things like this:  Better to use styles instead:
The Characteristics of CSS
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
Cascading Style Sheets in.NET Lilian Kiilu, Client/Server & Web Applications, Coms 463/563, Section 1pm, Fall 2005, November 16 th 2005.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Html Tables Basic Table Markup. How Tables are Used For Data Display Tables were originally designed to display and organize tabular data (charts, statistics,
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Ch 10 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
More CSS.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
CSS WORKSHOP Design Principles for Web Standards.
DIV, Span, CSS.
Tutorial 3 Adding and Formatting Text with CSS Styles.
Microsoft Expression Web 3 – Illustrated Unit F: Enhancing a Design with CSS.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CONTROLLING Page layout
Tutorial 4 Creating Page Layouts with CSS
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 5: HTML Tables.
Ch 11 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
NEW HTML5 LAYOUT ELEMENTS Explain: Going to see markup typically used to create this kind.
CSS.
Laying out Elements with CSS
Working with Cascading Style Sheets
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets for layout
Styles and the Box Model
Fixed Positioning.
CONTROLLING SIZES OF IMAGES USING CSS img.large { width: 500px; height: 500px;} img.medium { width: 250px; height: 250px;} img.small { width:
Web Development & Design Foundations with H T M L 5
Lesson 5: HTML Tables.
CSS Layout: Flexbox.
Cascading Style Sheets CSS LAYOUT WITH GRID
Presentation transcript:

IMAGES Controlling size of images in CSS Aligning images in CSS Adding background images

IMAGES  Controlling the size and alignment of your images using CSS keeps rules that affect the presentation of your page in the CSS and out of the HTML markup.

IMAGE SIZE IN CSS  control the size of an image using the width and height properties in CSS  chapter-16/image-sizes.html  Whenever you use consistently sized images across a site, you can use CSS to control the dimensions of the images, instead of putting the dimensions in the HTML.

IMAGE ALIGNMENT WITH CSS  using the float property to align images.  The float property is added to the class that was created to represent the size of the image  New classes are created with names such as align-left or align-right to align the images to the left or right of the page.  These class names are used in addition to classes that indicate the size of the image  chapter-16/aligning-images.html

IMAGE CENTERING WITH CSS  On the containing element, you can use the text-align property with a value of center.  On the image itself, you can use the use the margin property and set the values of the left and right margins to auto.  chapter-16/centering-images.html

BACKGROUND IMAGES  background-image  chapter-16/background-image-body.html  chapter-16/background-image-element.html

REPEATING IMAGES  background-repeat  chapter-16/background-repeat.html  background-attachment  chapter-16/background-attachment.html

BACKGROUND POSITION  background-position  chapter-16/background-position.html  chapter-16/background-position-percentage.html

SHORTHAND  Background  chapter-16/background-shorthand.html

IMAGE ROLLOVERS AND SPRITES  chapter-16/image-rollovers-and-sprites.html

CSS3 GRADIENTS  background-image  chapter-16/gradient.html

CONTRAST OF BACKGROUND IMAGES  High Contrast  Low Contrast  Screen

SUMMARY IMAGES  You can specify the dimensions of images using CSS.  Images can be aligned both horizontally and vertically using CSS.  You can use a background image behind the box created by any element on a page  Background images can appear just once or be repeated across the background of the box  You can create image rollover effects by moving the background position of an image  To reduce the number of images your browser has to load, you can create image sprites

HTML5 LAYOUT  HTML5 layout elements  How old browsers understand new elements  Styling HTML5 layout elements with CSS

TRADITIONAL HTML LAYOUTS  used elements to group together related elements on the page

NEW HTML 5 LAYOUT ELEMENTS

HEADERS AND FOOTERS   chapter-17/example.html

NAVIGATION   chapter-17/example.html

ARTICLES   The element acts as a container for any section of a page that could stand alone and potentially be syndicated  chapter-17/example.html

ASIDE   The element has two purposes, depending on whether it is inside an element or not.  chapter-17/example.html

SECTIONS   The element groups related content together, and typically each section would have its own heading.  chapter-17/example.html

HEADING GROUPS   The purpose of the element is to group together a set of one or more through elements so that they are treated as one single heading.  chapter-17/example.html

FIGURES   can be used to contain any content that is referenced from the main flow of an article (not just images).  chapter-17/example.html

SECTIONING ELEMENTS   Where there is no suitable element to group a set of elements, the element will still be used.  chapter-17/example.html

LINKING AROUND BLOCK-LEVEL ELEMENTS  HTML5 allows you to place an element around a block level element that contains child elements. This allows you to turn an entire block into a link.  chapter-17/example.html

HELPING OLDER BROWSERS UNDERSTAND HTML5  Older browsers that do not know the new HTML5 elements will automatically treat them as inline elements. Therefore, to help older browsers, you should include the line of CSS on the left which states which new elements should be rendered as block-level elements.  chapter-17/example.html

SUMMARY HTML5 LAYOU T  The new HTML5 elements Indicate the purpose of different parts of a web page and help to describe its structure.  The new elements provide clearer code (compared with using multiple elements).  Older browsers that do not understand HTML5 elements need to be told which elements are block-level elements.  To make HTML5 elements work in Internet Explorer 8 (and older versions of IE), extra JavaScript is needed, which is available free from Google.