Mark J Collins October 6 th, 2012. Selectors Element selectors Class selectors ID Selectors Attribute selectors Pseudo-class selectors Combining selectors.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

Neal Stublen Content Models  Metadata content Data not necessarily presented on the page ○ title, link, meta, style  Flow content.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today’s objectives  Element relations – tree structure  Pseudo classes  Pseudo elements.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
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.
Unit 20 - Client Side Customisation of Web Pages
Tutorial 4: Creating page layout with css
Tutorial 4: Creating page layout with css
CIT 256 CSS Divs & Buttons Dr. Beryl Hoffman. CSS for Layout We now can make our own divs to divide up a web page : Header Header Navigation Navigation.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
The Viewport body element w/ bg image body element w/ bg image wrapper.
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
CISC 474: Advanced Web Technologies HTML5 & CSS3, & Responsive Design.
Tutorial #8 – Creating Data Tables. Tutorial #6 Review – Layouts Two Column Fixed Width, Three Column Fixed Width Class VS. ID Container Universal Selector.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
LING 408/508: Programming for Linguists
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 10: A Deeper Look at CCS- Spring 2011.
CHAPTER 3 CSS & CSS3 อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
COMP213 – Web Interface Design
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.
Cascading Style Sheets II Robin Burke ECT 270. Outline Midterm solution CSS review CSS selection selectors pseudo-classes classes, ids div and span Final.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
>> 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.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Cascading Style Sheets Level 2. Course Objectives, Session 1 Level 1 Quick Review Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your.
Neal Stublen New Element Styling  html5shiv.js provided support in older IE browsers for new sectioning elements aside, header,
WEB DEVELOPMENT IMMERSIVE BUILDING PAGE LAYOUTS. 2 Box Model Scaling Positioning Boxes Box Aesthetics HTML 5 Semantic Tags CSS Resets TOPICS GENERAL ASSEMBLYWEB.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 5.
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,
 Chapter 4.  External Style Sheet o Used to define styles for multiple pages in a Web site. o Also called Linked Style Sheets o Crete the style sheet.
CH 12 CSS Style Sheets 1. Objective What is CSS? Selecting elements Different rules for different media Importing style sheets 2.
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
INT222 – Internet Fundamentals Week 8: Using New HTML features 1.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 4 Formatting Text and Links.
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 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.
>> The “Box” Model
Advanced CSS BIS1523 – Lecture 20.
Web Development & Design Foundations with HTML5 7th Edition
Web Development & Design Foundations with HTML5
Chapter 6 More CSS Basics Key Concepts
6 Layout.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Styles and the Box Model
Fixed Positioning.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
How to use the CSS box model for spacing, borders, and backgrounds
Web Development & Design Foundations with HTML5
Web Client Side Technologies Raneem Qaddoura
Presentation transcript:

Mark J Collins October 6 th, 2012

Selectors Element selectors Class selectors ID Selectors Attribute selectors Pseudo-class selectors Combining selectors Unions Planning your web page Using the Box Model Diagramming the layout Creating the HTML structure Effects Rounded corners Gradients Tables Multiple columns Shadows Zebra striping 3D transforms CSS animation Introduction to CSS3

{ ; ; … } p { color:green; font-size:12px; } p {color:green; font-size:12px;}

Introduction to CSS3 New HTML5 Elements article – a stand-alone portion of content such blog entry. aside – content usually put to one side of the page details – used for expandable content figcaption – used with figure to associate a caption with an image figure – used to wrap embedded content such as an image or graphic footer – the page or section footer header – the page or section header hgroup – used to group header elements like h1, h2, etc. nav – used to contain a group of links output – contains output such as the result of a user action section – used to organize content in to logical sections summary – usually used in conjunction with one or more details elements

Introduction to CSS3 Class and ID Selectors.featured { background-color:yellow; } My featured content #intro { color:blue; }

Introduction to CSS3 Attribute Selectors [name="book"] { background-color:yellow; } ~ - (e.g. [name~="book"] ) The attribute value must include the word indicated by the selector value (e.g. name="some book titles"). This is exactly how the class selector works. | - (e.g. [name|="book"] ) The attribute value must begin with a word that matches the selector value (e.g. name="book titles") ^ = (e.g. [name^="book"] ) The attribute value must begin with the selector value (e.g. name="books") $ - (e.g. [name$="book"] ) The attribute value must end with the selector value (e.g. name="checkbook") * - (e.g. [name*="book"] ) The attribute value must contain the selector value (e.g. name="overbooked")

Introduction to CSS3 Pseudo-Class Selectors a: { color: blue; } Examples: :active :checked :disabled :empty :enabled :focus :hover :link :visited :first-child :last-child :nth-child(n) a:visited { color: purple; }

Introduction to CSS3 Combining Selectors, - (e.g. header, p) Selects all p elements as well as all header elements. space – (e.g. header p) Selects the second element when it is inside the first element. The header element does not have to be the immediate parent, just somewhere in node’s parentage. * - (e.g. header*p) selects the second element when it is a grandchild or later descendant of the first element. > - (e.g. header>p) Selects the second element when the first element is the immediate parent. + - (e.g. header+p) Selects the second element when the first element is the preceding sibling. ~ - (e.g. p~header) Selects the second element when it follows the first element (not necessarily immediately).

Introduction to CSS3 Creating Unions header+p,.book, a:visited A union simply combines two or more selectors with a logical OR operation For further reference go to:

Introduction to CSS3 Margin, Padding, and Border margin: 2px; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; margin: 2px 2px 2px 2px;

Introduction to CSS3 Laying Out a Web Page

Introduction to CSS3 Vendor Prefixes header { -moz-border-radius: 25px; -webkit-border-radius: 25px; -o-border-radius: 25px; -ms-border-radius: 25px; border-radius: 25px; } PrefixBrowser vendor -moz-Firefox -webkit-Chrome, Safari -o-Opera -ms-Internet Explorer

Introduction to CSS3 Box Shadows h-shadow The position of the horizontal shadow (Can be negative) v-shadow The position of the vertical shadow Blur*The blur distance Spread*The size of shadow Color*The color of the shadow Inset* Changes the shadow from raised to sunken

Introduction to CSS3 Summary Rounded corners Gradients Tables Multiple columns Shadows Zebra striping 3D transforms CSS animation