1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.

Slides:



Advertisements
Similar presentations
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Advertisements

Cascading Style Sheets
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.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Let’s do it with Style! Fonts, Colors, and Graphics CSCI 202 Day 1 (Fall 2014) Font/Colors CS
Tutorial 3 – Designing a Web Page Working with Color & Graphics Mrs. Wilson.
Web Design & Development Cascading Style Sheets (CSS)
Tutorial 3 Working with Cascading Style Sheets. XP Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 4 Creating Special Effects with CSS
MORE Cascading Style Sheets (The Positioning Model)
4.01 Cascading Style Sheets
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
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.
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.
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Tutorial 4 Creating Special Effects with CSS
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Tutorial 3 Working with Cascading Style Sheets (CSS)
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
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.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
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.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
Positioning and Printing Creating Special Effects with CSS.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Relative, absolute, and Floating Positioning, Cascading Style Sheet, and Inheritance.
CSS: Cascading Style Sheets Part II. Style Syntax.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Tutorial 3 Designing a Web Page with CSS
Cascading Styles Sheets Positioning HTML elements.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
CNIT 131 Graphics.
The Box Model in CSS Web Design – Sec 4-8
( Cascading style sheet )
The Box Model in CSS Web Design – Sec 4-8
Concepts for fluid layout
The Box Model in CSS Web Design – Sec 4-8
Web Systems & Technologies
Positioning.
MORE Cascading Style Sheets (The Positioning Model)
Cascading Style Sheets™ (CSS)
Tutorial 3 Working with Cascading Style Sheets
Tutorial 4 Creating Special Effects with CSS
Positioning.
Concepts for fluid layout
Web Programming and Design
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling lists 4. Positioning objects with CSS

1. Working with Color  HTML/CSS text-based language, requiring you to define your colors in textual terms  identifies a color in one of two ways: o By the color name o By the color value  To have more control and more choices, specify colors using color values  A color value is a numerical expression that precisely describes a color 2

Working with Color  Any color can be thought of as a combination of three primary colors: red, green, and blue 3

Working with Color 4  By varying the intensity of each primary color, you can create almost any color and any shade of color  This principle allows a computer monitor to combine pixels of red, green, and blue to create the array of colors you see on your screen

Working with Color (decimal representation)  Software programs, such as your Web browser, define color mathematically  The intensity of each of three colors (RGB) is assigned a number from 0 (absence of color) to 255 (highest intensity)  In this way, 255 3, or more than 16.7 million, distinct colors can be defined  Each color is represented by a triplet of numbers, called an RGB triplet, based on the strength of its Red, Green, and Blue components 5

Working with Color (hexadecimal representation)  color values can be entered as hexadecimals  A hexadecimal is a number based on a base- 16 numbering system rather than a base-10 numbering system that we use every day o Base 10 counting uses a combination of 10 characters (0 through 9) to represent numerical values o Hexadecimals include six extra characters: A (for 10), B (for 11), C (for 12), D (for 13), E (for 14), and F (for 15) 6

Working with Color (hexadecimal representation)  To represent a number in hexadecimal terms, you convert the value to multiples of 16 plus a remainder. For example: o 21 is equal to (16 x 1) + 5, so its hexadecimal representation is 15 o The number 255 is equal to (16 x 15) + 15, or FF in hexadecimal format (remember that F = 15 in hexadecimal) o In the case of the number 255, the first F represents the number of times 16 goes into 255 (which is 15), and the second F represents the remainder of 15  Once you know the RGB triplet of a color, the color needs to be converted to the hexadecimal format 7

Working with Color  Basic colors: 17 colors 8

Working with Color 9 Partial list of extended color names

2. Floating an Element 10

Floating an Element  To float an element, use the style float: position where position is none (to turn off floating), left or right  Suppose, jjay is the id of the image  Add this in the stylesheet: o #jjay {float: right} 11

3. Applying Styles to Lists  To specify the list marker displayed by the browser, you can apply the style list-style-type: type 12

Applying Styles to Lists 13

Applying Styles to Lists  Most browsers place the list marker to the left of the block, lining up the markers with each list item list-style-position: position 14

4. Positioning Objects with CSS 15

Positioning Objects with CSS  Create div containers for each note  Each note should have a unique id  Add a class attribute to apply a common set of styles 16 place your notes here..notes {font-size: 8pt; background-color: yellow; border: 3px; width: 130px}.notes p {margin: 5px;} Introducing Styles...

Positioning Objects with CSS  CSS-P (CSS-Positioning) became part of the specification for CSS2, and positioning styles were some of the first CSS2 styles to be adopted by browsers position: type; top: value; right: value; bottom: value; left: value;  Absolute positioning enables you to place an element at specific coordinates either on a page or within a containing element position: absolute; left: 100px; top: 50px 17

Positioning Objects with CSS  Relative positioning is used to move an element relative to its default position on the page position: relative; left: 100px; top: 50px  Additional feature: You can fix an element at a specific spot in the document window while the rest of the page scrolls by setting the value of the position style to fixed.notes {position: fixed; left: 100px; top: 50px} 18

Positioning Objects with CSS 19