Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.

Slides:



Advertisements
Similar presentations
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Advertisements

Cascading Style Sheets
Cascading Style Sheets
Today CSS HTML A project.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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
Chapter 8 Creating Style Sheets.
Murach’s ASP.NET 3.5/C#, C5© 2008, Mike Murach & Associates, Inc.Slide 1.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
COMP101 – Exploring Multimedia and Internet Computing LA2 (Thur 14:00 – 16:50) TA: Jackie Lo.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
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.
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.
Technologies for web publishing Ing. Václav Freylich Lecture 5.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
CSS Dvijesh Bhatt.
CSS Style Rules Guang Tong, Zhan L;lo’p[ Css Style Rule Guang Tong Zhan Three ways to insert CSS 1 External style sheet 2 Internal style sheet 3 Inline.
Cascading style sheets (CSS)
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
WRT235: Writing in Electronic Environments CSS Classes, IDs, divs.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Ch 10 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
Using the CSS. What is CSS? CSS is a language that’s used to define the formatting applied to a Website, including colors, background images, typefaces.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Building Optimised Web Sites with CSS Folkert Klemme.
Moving Boxes The CSS ‘box’ Model and moving elements around the page 1.
DIV, Span, CSS.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Web Design Part I. Click Menu Site to create a new site root.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
OV Copyright © 2008 Element K Content LLC. All rights reserved. Working with Web Pages  An Introduction to Cascading Style Sheets  Format a Web.
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.
LT: I can use CSS to decorate a web page. Do Now: Get your storyboard, and log in to winhome. Write our a list of colors you want in your website. (Minimum.
>> CSS Layouts. Recall Properties of Box – Border (style, width, color) – Padding – Margin – Display – Background – Dimension Welcome Padding Area Border.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
CSS.
Cascading Style Sheets (CSS) Internal Style Sheets Classes
Working with Cascading Style Sheets
CSS HTML and website development.
4.01 Cascading Style Sheets
>> Introduction to CSS
>> CSS Rules Selection
Cascading Style Sheets (Layout)
CASCADING STYLE SHEET CSS.
Website Design 3
4.01 Cascading Style Sheets
Presentation transcript:

Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes

Types of Styles 1.Inline Styles – Styles that you type “inline” with each tag 2.Internal Style sheets: Styles are defined for each page h1 { color: purple; } 3.External style sheets: Styles are defined and linked to the entire site.

Using Internal Style Sheets This is a great page! h1 { color: purple; } Hello World! This is my first page Style definitions go inside element Style element is inside element

Placement of Internal Style Sheet

Using Different CSS Selectors Type Selector(What we’ve been using…) –redefines the look of a specific tag –A type selector matches every instance of the element type in the document tree E.g. body {background-color: #000000;} Class Selector (new) –can apply to any tag E.g..indent{margin-right:5%;margin-left: 5%;} In HTML,

Using Class Attribute Selectors CLASS is an HTML attribute that assigns a class name to any HTML element on a web page. Short cut to diversifying styles on your pages Can be used to identify which style sheet rules should be applied for the particular element of a web page

Using the Class Attribute Selector A class name is created by declaring a style rule in your style sheet and adding (.) flag character indicating that the selector is a class.red {color:red}.pink {color: #FF00FF } Add it to the HTML code of a web page by using the CLASS attribute Company Description

Using the Class Attribute Selector For color or style variety: IN HTML CODE Inline style: Or Class (better!)

Using Different CSS Selectors When to use which? –Use “type selector” when you want to apply certain style for all occurrences of a certain tag –Use “class selector” if you want to apply the style for many (but not all) occurrences of a certain tag; OR if you want to apply the style for more than one type of tags

More Styling Options – DIV Boxes HTML Tag – Creates a unique area on your webpage that can be styled with various indexes (like classes) Can be used together to help layout specific pages with greater control and style Everything in the box will have the same attributes

DIV Boxes - Layouts Page styled by page tag in CSS (Background) White background set by DIV 1 Header area set by DIV 2 Navigation area set by DIV 3 Text area set by DIV 4 Left box area set by DIV 5 Footer area set by DIV 6

DIV Boxes - HTML Information to include in the box or area – can be any web element including another div box All controls for the div box are defined on the style sheet using this index

Example Indexes #wrapper { position: relative; width: 980px; height: auto; margin: 10px auto 10px auto; background: #FFFFFF; } #header { margin: 0px 0px 0px 0px; height: 200; position: relative; padding: 25px 45px 25px 45px; width: 900px; } #menu { margin: 0px 0px 0px 0px; height: 150; position: relative; padding: 0px 0px 0px 0px; width: 975px;} #page { padding: 5px 45px 15px 45px; position: relative; width: 890px; margin: 0; } #foot { background-color: #cdcdcd; color: black; font-size: 8pt; text-align: center; padding: 5px 25px 0px 25px; position: relative; width: 930px; margin: 0; } #content-box1 { width: 320px; float: left; } #content-box2 { margin: px; width: 320px; }

Understanding Classes Classes & indexes css/css_classes.htmlhttp://rainbow.arch.scriptmania.com/ css/css_classes.html