CSS.

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

Cascading Style Sheets
Cascading Style Sheets
Today CSS HTML A project.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Chapter 8 Creating Style Sheets.
Design, Formatting, CSS, & Colors 27 February, 2011.
Design, Formatting, CSS, & Colors September 9, 2010.
4.01 Cascading Style Sheets
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
INTRODUCTION TO CSS. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features of CSS Features of CSS  Creating Style Sheet Creating Style Sheet.
 Look especially at › File Tips and Shortcuts › Student video.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
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.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets (CSS) Internal Style Sheets Classes
Cascading Style Sheet.
CSS Cascading Style Sheets
Getting Started with CSS
CSS HTML and website development.
4.01 Cascading Style Sheets
( Cascading style sheet )
>> Introduction to CSS
Introduction to CSS.
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
CX Introduction to Web Programming
Cascading Style Sheets contd: Embedded Styles
Cascading Style Sheets (CSS)
Introduction to Web programming
Intro to CSS CS 1150 Fall 2016.
Cascading Style Sheet (CSS)
Cascading Style Sheets
CASCADING STYLE SHEET CSS.
Using CSS.
CSS.
Filezilla problems continuing
IS333: MULTI-TIER APPLICATION DEVELOPMENT
CSS Cascading Style Sheets
Website Design 3
Introduction to CSS.
Cascading Style Sheets
Introduction to Web programming
Intro to CSS CS 1150 Spring 2017.
CSS.
Styles and the Box Model
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
Introduction to Cascading Style Sheets (CSS)
Working with Cascading Style Sheets (CSS)
Working with Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets™ (CSS)
DynamicHTML Cascading Style Sheet Internet Technology.
Training & Development
Introduction to CSS.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Web Design & Development
Session 3: Basic CSS Spring 2009
Cascading Style Sheets
4.01 Cascading Style Sheets
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
External Style Sheets.
Cascading Style Sheets III B. Com (Paper - VI) & III B
Introduction to Cascading Style Sheets (CSS)
One Set of Styles Connected to As Many Pages as You Want!!!
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CSS

Web Instructions: Three Legs HTML Content CSS Presentation JavaScript Behavior

CSS... CSS is for giving style to your content HTML: content CSS: style CSS Zen Garden

What can you change? Font: size, color, style Background Border More on color next week For now, by name Background Border Must have size color and style Position: margins, centering Size

Syntax (how it looks) Selector specifies the HTML element to style Declaration: always contains a property & value ends with a semicolon Property: style element you want to change Value: what you are changing the property to Next we’ll discuss the syntax of css. It’s a different language from html, so it will look a little bit different. Selector allows us to choose a tag from the html to edit

Validating Your CSS http://jigsaw.w3.org/css-validator/

Formatting your CSS http://www.cleancss.com/css-beautify/ Formatting Practices: some flexibility, but you must be consistent. always comment unclear code! /* someCommentHere */ curly braces tab alignment Bad practices: declarations on the same line as braces or selector multiple declarations on the same line leaving off the last semi-colon http://www.cleancss.com/css-beautify/

Need to Connect HTML & CSS Use the same CSS for multiple pages Therefore HTML point to CSS

<link href=“mystyle.css” rel=stylesheet type=“text/css”> Adding CSS to your HTML The best (only way for this class!) way to insert CSS to your HTML is by using an External Style Sheet Define all your styles in one place Easily change the look of your site Use the following <link> tag within the <head> tag Save your external style sheet as a .css file. <link href=“mystyle.css” rel=stylesheet type=“text/css”>

LINK tag LINK: connect this file to this page HREF: the file that you want to use Can be anywhere Most commonly in the same folder as the HTML page Just use the file name (name.ext) Will look at other options later REL: the relationship of the two files TYPE: how the file that is pointed at can be read

Komodo templates Update HTML template Create CSS template

Introducing jsfiddle jsfiddle.net Sandbox to be able to explore HTML and CSS Will use it for demonstrating and snippets because its easier to see everything at once Build web pages in Komodo

CSS Details

Commonly Used Tags & Properties full reference sheet

Font Families Preferable to use: universality Multiple fonts: use first available

Defining size pt refers to printer’s font measurement px refers to pixels em is a relative measure 1 em = base size (defined in body or default) Great for changing all at once

Centering Elements such as body, div, main, header, footer can be given widths Specific size (px): never change Percentage of window (%): change By default, they will be on the left edge But you can change margins To center, tell it to AUTOmatically compute the margin

PSEUDO-ELEMENTS Relate to a piece rather than all of the element selector::pseudo-element Style the first letter, or line, of an element first-line first-letter Insert content before, or after, the content of an element before after