Adding Style with CSS Helen Zeng | Developer Evangelist

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

Introduction to HTML & CSS
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Today CSS HTML A project.
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
Introduction to CSS. What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML.
Cascading Style Sheets Basics. Why use Cascading Style Sheets? Allows you to set up a series of rules for all pages in a site. The series may be changed.
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.
Susan Ibach | Microsoft Technical Evangelist Christopher Harrison | Microsoft Certified Trainer.
Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
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.
Form Tag How to use Form Tag Something NEW ? PARAMETER Attribute NAME Specifies the name for a form To specify which form to submit with JavaScript, this.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Jon Galloway | Development Platform Evangelist Christopher Harrison | Microsoft Certified Trainer.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Microsoft Virtual Academy Stacey Mulcahy | Technical Evangelist Christopher Harrison | Content Developer.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tom Resing | SharePoint Engineer, Jive Software Christopher Harrison | Microsoft Certified Trainer.
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.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
Working with Cascading Style Sheets
CSS for Styling By Jinzhu Gao.
Introduction to Programming using Python
HTML5 and CSS3 Illustrated Unit D: Formatting Text with CSS
4.01 Cascading Style Sheets
SharePoint 2013 Best Practices
>> Introduction to CSS
Cascading Style Sheets
INTRODUCTION TO HTML AND CSS
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
>> CSS Rules Selection
CX Introduction to Web Programming
Web API Design Jeremy Likness | Principal Architect
Introduction to Web programming
Introduction to JSON with C#
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
DynamicHTML Cascading Style Sheet Internet Technology.
Introduction to AngularJS
Introduction to jQuery
CS134 Web Design & Development
Introduction to Programming using Python
Working with Cascading Style Sheets (CSS)
Working with Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
The Internet 10/6/11 Cascading Style Sheets
Cascading Style Sheets
DynamicHTML Cascading Style Sheet Internet Technology.
INTRODUCTION TO HTML AND CSS
Game Production Basics
Lecture Review What is a hybrid app? What does a UI framework do?
Made By : Lavish Chauhan & Abhay Verma
Web Design & Development
Single Page Applications with jQuery or AngularJS
Developing Universal Windows Apps with HTML and JavaScript
4.01 Cascading Style Sheets
Quick Start Challenge: Universal Projects to Build a Game
Pranav Rastogi | Program Manager, Microsoft
Quick Start Challenge: Microsoft Advertising SDK
CS332A Advanced HTML Programming
Stacey Mulcahy| Technical Evangelist Jamie Kosoy | Content Developer
Getting Started with PowerShell Jump Start
Presentation transcript:

Adding Style with CSS Helen Zeng | Developer Evangelist Christopher Harrison | Content Developer

Meet Helen Zeng| ‏@hwz Developer Evangelist for Startups Works with top tier startups out of the bay area Focused on Azure and apps Spreads the word of Bizspark Web development nerd Volunteer CS teacher MEAN Stack Advocate Borderline-obsessive about Game of Thrones/ASoIF

Meet Christopher Harrison | ‏@geektrainer Content Developer Focused on ASP.NET and Office 365 development Microsoft Certified Trainer Misses his Commodore 64 Long time geek Regular presenter at conferences Periodic blogger Certification advocate Marathoner, husband, father of one four legged child

Course Topics Adding Style with CSS Jump Start 01 | Getting started with CSS 04 | Media queries 02 | CSS selectors 05 | Transformations and transitions 03 | Page layouts 06 | CSS preprocessors

Setting Expectations Target Audience Web developers with HTML experience Developers with CSS experience looking to fill gaps Suggested Prerequisites/Supporting Material MVA: HTML5 & CSS3 Fundamentals MOC: 20480 - HTML5, CSS & JavaScript

Join the MVA Community! Microsoft Virtual Academy Free online learning tailored for IT Pros and Developers Over 2.5M registered users Up-to-date, relevant training on variety of Microsoft products “Earn while you learn!” Get 50 MVA Points for this event! Visit http://aka.ms/MVA-Voucher Enter this code: PowerJump1 (expires 8/15/2013)

01 | Getting started with CSS Helen Zeng | Developer Evangelist Christopher Harrison | Content Developer

Module Overview What is CSS? Basic element selection Applying CSS to pages CSS inheritance

What is CSS?

What is CSS? Cascading style sheets A style language for formatting documents

Why use CSS? Separation of concern Document structure and semantics HTML Logic JavaScript Formatting and display CSS

How do you want them to look and where do you want them to appear? CSS syntax basics What elements, or types of elements, do you want to apply the style to? selector { } property: value; How do you want them to look and where do you want them to appear?

Basic element selection

Basic element selection Class ID

Element Applies to element Simply use the name of the element h2 { font-family: verdana, sans-serif; font-weight: bold; color: blue; }

Class Applies to all elements with a matching class By default classes are available to all elements Limit to specific elements by preceding class with element /* CSS */ .title { color:red; } <!-- HTML --> <div class='title'> Hello, CSS! </div> Output Hello, CSS! /* CSS */ div.title { color:red; } <!-- HTML --> <div class='title'> Hello, div! </div> <span class='title'> Hello, span! </span> Output Hello, div! Hello, span!

ID Applies to element with ID IDs must be unique #header { font-family: verdana, sans-serif; font-weight: bold; color: blue; }

Basic element selection

Applying CSS to pages and elements

Applying CSS to pages and elements Link to external file <link rel='stylesheet' type='text/css' href='site.css' /> Add <style> section to page <style> /* standard CSS syntax */ </style> Use the style attribute <div style='property:value;property:value;'>Hello!</div>

CSS inheritance

CSS inheritance Conflicts Style application Element conflicts

Conflicts Cascading – it's right there in the name! Conflicts are expected Conflicts only arise when the same property has two different values Different properties are simply combined

Style application Closest to the element takes precedence Style attribute Style section External style sheet (sometimes called "last write wins")

Style application

Element conflicts Multiple selectors can apply to one element Closest description takes precedence ID Class Element

Element conflicts