CSS The Definitive Guide Chapter 9.  As has been stressed in CIS 131 or your initial learning of HTML5 “Planning” is important!  It is even more true.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
Introduction to CSS.
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.
CSS cont. October 5, Unit 4. Padding We can add borders around the elements of our pages To increase the space between the content and the border, use.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
กระบวนวิชา 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.
Cascading Style Sheets Color and Background Controls Border and Margin Controls (Boxes)
CSS: Class 1 Background Images, Controlling Position of Background Images, Add Padding to Page Elements, Add Borders to Elements on a Page.
Color Theory Using Color in Multimedia. Color Theory Color theory encompasses a multitude of definitions, concepts and design applications. All the information.
Design, Formatting, CSS, & Colors 27 February, 2011.
4.01 Cascading Style Sheets
Types of Color Theories 1. 1.Subtractive Theory The subtractive, or pigment theory deals with how white light is absorbed and reflected off of colored.
Cascading Style Sheets 1 Color and Backgrounds. Cascading Style Sheets 2 Color and Backgrounds Computer color basics Expression of color values using.
Color Selection in Web Design
Unit 1: Designing & Planning a Website Topic B: Color Theory Lesson 2. Selecting a Color Scheme.
Color Selection in Web Design Web Design – Sec 4-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Color Wheel PRIMARY COLORS : Red, yellow and blue
BY KATLYN WALSH.  Basic techniques for combining colors. Below are shown the basic color chords based on the color wheel. Complementary. Colors that.
CSS Dvijesh Bhatt.
The Use of Color in Advertising Professional Communication Jane Boyd.
Color Theory. Color: Enhances a message Enlivens a presentation Gives an object visual weight and emphasis Adds richness and depth to screen design.
Color in Design. Uses of Color Call attention to specific data or information Identify elements of structure and processes Portray natural objects realistically.
WRT235: Writing in Electronic Environments CSS Backgrounds, colors, fonts.
China: Good luck, celebration, summoning Cherokees: Success, triumph
Color Theory.
Color Theory Color Wheel Color Wheel Color Values Color Values Color Schemes Color Schemes.
CSS in XHTML continued Please use speaker notes for additional information!
Color Design for the Web Designing for the Web. How We See Color Colors are recognized through receptors at the back of our eyes. The eye sees the light;
Basic Color Theory.  The Color Wheel A color circle, based on red, yellow and blue, is traditional in the field of art. Sir Isaac Newton developed the.
 Color can alter the appearance of form and space.  Color can affect our performance abilities and change our moods.  Colors can symbolize different.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
The Colour Wheel.
Adding Graphics to Web Pages. CSS does not have any properties specifically aimed at formatting images Use properties you have already learned, i.e.,
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.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Color Wheel Is there is difference between the color wheel for paint and the colors in the light spectrum?
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Basic Color Theory of different cultures
More CSS.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
>> 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.
Colors and backgrounds The following CSS properties will be explained: 1.color 2.background-color 3.background-image 4.background-repeat 5.background-attachment.
So far, we have looked at CSS selectors that correlate with HTML tags Now, we’ll see how you can define your own selectors using class and ID selectors.
DIV, Span, CSS.
Colour Theory Revision and Complementary Colours.
Microsoft Expression Web 3 – Illustrated Unit F: Enhancing a Design with CSS.
12/20/20151 Color Fall, 2010 Modified by Linda Kenney 10/26/10.
CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Color Instructor: Joseph.
Colors and backgrounds The following CSS properties will be explained: 1.color 2.background-color 3.background-image 4.background-repeat 5.background-position.
ColourColour. The Colour Wheel The colour wheel is a colour circle, based on red, yellow and blue, is traditional in the field of art.
Color Theory.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Lesson 5 - Colour Schemes and Use in Displays
Colour Theory Colour Wheel Colour Values Colour Schemes.
Web Design (15) CSS Opacity, Link Colours & Background Images.
CIS234A Lecture 6 Instructor Greg D’Andrea. Span and Div The span and div elements are a generic means by which we can add structure to documents. The.
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.
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,
An Introduction………. Color The most important element in design One of the first decisions made when decorating a room Sets the mood in a room Leaves a.
The Element of COLOR. Color A visual perception created by the spectrum of light. COLOR IS.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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,
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Tutorial 3 Working with Cascading Style Sheets
Presentation transcript:

CSS The Definitive Guide Chapter 9

 As has been stressed in CIS 131 or your initial learning of HTML5 “Planning” is important!  It is even more true when working with colors.  Things to think about when thinking about colors:  If you use too many colors will it overwhelm the user?  If you change the default hyperlinks colors, will it confuse the user?  Will color scheme make it difficult for the user to read?

 Used properly color can really strengthen the presentation of a document.

 When many people first start building their Web pages, they create pages in colors that they like. If you're lucky or have a good eye, you'll end up with colors that look nice together. But it's very easy to set up a color scheme that clashes and is difficult for your readers to view for long periods or at all. The primary colors are RED, YELLOW, and BLUE. These colors, in traditional color theory, cannot be formed by mixing any other color. All other colors are derived by combinations of these colors.

Secondary colors are ORANGE, GREEN, and PURPLE. These colors are the combination of red and yellow (orange), yellow and blue (green), and blue and red (purple).

Tertiary colors are YELLOW-ORANGE, RED-ORANGE, RED-PURPLE, BLUE-PURPLE, BLUE-GREEN, and YELLOW-GREEN. These are the combinations of the secondary colors.

Understanding color theory will help you to understand how color works on Web pages. And one of the first places to start learning color theory is with the color wheel. Sir Isaac Newton first put together a circular diagram of colors in This color wheel allows you to see groupings of colors that are harmonious together and other colors that might clash.

Complementary colors are those colors that are opposite one another on the color wheel. By using colors that are opposite one another, you create color schemes that have high contrast and so are brighter and more vivid. Some contrasting colors are: red and green or blue and orange.

On display screens, the foreground consists of the characters and pictures that appear on the screen. The background is the uniform canvas behind the characters and pictures. Lets try the “Test Page”“Test Page”

Color symbolism by culture If you use color on your Web site, then you should be aware of how your audience views those colors. This is especially important if you are designing a site that is intended for an audience of a different culture than your own (or a global audience). The cultural basis for color symbolism can be very powerful, and if you don't understand what you're saying with your colors, you can make big mistakes.

RED China : Good luck, celebration, summoning Cherokees: Success, triumph India: Purity South Africa : Color of mourning Russia : Bolsheviks and Communism Eastern : Worn by brides Western : Excitement, danger, love, passion, stop, Christmas (with green

Orange Ireland: Religious (Protestants) Western: Halloween (with black), creativity, autumn Yellow China: Nourishing Egypt: Color of mourning Japan: Courage India: Merchants Western: Hope, hazards, coward

 There are two ways to directly affect the foreground color of an element: by using the color property and by setting the border colors using one of a number of properties.  Example of coding: p.warn {color: red; } (using a class of warn to each warning paragraph and making it red.

 There are many uses for color, the most basic of which is to replace the HTML 2.2 body attributes text, link, alink and vlink. HTML that uses body attributes. CSS that replaces above html code. Body {color: black;} A:link {color: #808080;} A:active {color: silver;} A:visted {color: #333333;}

Changing the color of a border around an image: by using color or border-color img.type1 {color: gray; border-style: solid;} or Img.type2 {border-color: gray; border-style: solid;}

 Example of coding for form elements: Select {color: rgb(33%, 33% 33%);} Input {color: gray;}

The background area of an element consists of all of the space behind the foreground to the outer edge of the borders or the content box and the padding are all part of the element’s background and the borders are drawn on top of the background.

 Declaring a color for the background of an elements use background-color. P {background-color: gray; padding: 10px;} Adding padding of 10px will let the color extend a little bit from the text.

 Background color can be set for just about any element  Background-color is not inherited  Default value is transparent

body {color: black; background-color: white;} h1,h2 {color: yellow; background-color: rgb90,51,0);} p {color: #555;} a:link {color: black; background-color: silver;} a:visted {color: gray; background-color: white;} Try some of your own!

Coding for having an image in the background. This coding will also tile the image onto the page. Body {background-image; url(bg23.gif);}

 Please look at page 261 thru 266 Background positioning: Background-repeat: repeat-y Will put the image vertically along the y axis Background-repeat: repeat-x Will put the image along the x axis

 Don’t want to repeat the background image at all. Use the value no-repeat Background-repeat: no-repeat; 1) Open up your web site and find a small image where you could place an image vertically or horizontally. 2) Now place a bigger image somewhere in your pages using no-repeat.

 It is possible to change the image’s position in the background such as centering an image or placing it on the bottom or top or right etc.  Go to your web site again and add the code to place an image in the center. (see page for reference)

Using the property background-attachment, you can declare the origin image to be fixed with respect to the viewing area and therefore immune to the effects of scrolling. background-attachment: fixed; In a web browser the viewing area can change as the user resizes the browser’s window. This causes the background’s origin image to shift position as the window changes sizes. Look at examples on page 276 – 277.

When a background image has been fixed, it is positioned with respect to the viewing area, not the element that contains it.

 Please apply a background color to at least one paragraph somewhere on your site that makes sense.  Please apply a background image to an inline element in a paragraph of your choice.  Please incorporate an image of your choice on a page of your web site to the page background. (this must be a different/or an additional image from what was previously done in class)  Please provide comment codes that include today’s date and what you have included.