CSS3 Basics. From & CSS Visual Dictionary Learning Curve Books, LLC

Similar documents
CSS Selectors. element selectors. .class selectors. #id selectors


<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

Appendix D CSS Properties and Values

Adding CSS to your HTML

CSS. Shan-Hung Wu CS, NTHU

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

CSS.

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

BIM222 Internet Programming

Web Engineering CSS. By Assistant Prof Malik M Ali

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

CSS: The Basics CISC 282 September 20, 2014

Zen Garden. CSS Zen Garden

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

CSS Cascading Style Sheets

CSS: Cascading Style Sheets

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC

CSC309 Programming on the Web week 3: css, rwd

Cascading Style Sheets (CSS)

Chapter 3 Style Sheets: CSS

CASCADING STYLESHEETS

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

2005 WebGUI Users Conference

Client-Side Web Technologies. CSS Part II

Cascading Style Sheets

Web Site Design and Development Lecture 6

Parashar Technologies HTML Lecture Notes-4

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Cascading Style Sheet Quick Reference

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

FLOATING AND POSITIONING

Cascade Stylesheets (CSS)

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

Cascading Style Sheets CSCI 311

Web Site Design and Development Lecture 7. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

CSS Styles Quick Reference Guide

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

CSS: Cascading Style Sheets

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

To link to an external stylesheet, the link element is placed within the head of the html page:

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

The Importance of the CSS Box Model

Web Information System Design No.4 Put Style to Web Documents. Tatsuya Hagino

IMY 110 Theme 6 Cascading Style Sheets

Media Types & Media Features

CSS: Layout, Floats, and More

CSS Cascading Style Sheets

First Name Last Name CS-081 March 23, 2010 Midterm Exam

Certified CSS Designer VS-1028

INTRODUCTION TO CSS. Topics MODULE 5

CMPT 165: More CSS Basics

ACSC 231 Internet Technologies

APPLIED COMPUTING 1P01 Fluency with Technology

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Assignments (4) Assessment as per Schedule (2)

COMP519 Web Programming Lecture 7: Cascading Style Sheets: Part 3 Handouts

Web Design and Implementation

Deccansoft Software Services

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

Chapter 4 CSS basics

1 of 7 11/12/2009 9:29 AM

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

ITNP43: HTML Lecture 5

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

CSS 1: Introduction. Chapter 3

ID1354 Internet Applications

Tutorial 4: Creating Special Effects with CSS

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

Introduction to Computer Science Web Development

Tutorial 3: Working with Cascading Style Sheets

VISA/APCO/STAC 2P61 WEBSITE CREATION Fall Term 2012

Using Advanced Cascading Style Sheets

CSS

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

HTML and CSS COURSE SYLLABUS

Media-Specific Styles

Web Site Design and Development Lecture 5

COMS 359: Interactive Media

Creating and Building Websites

Web Development & Design Foundations with HTML5

Getting your work online. behance.net cargo collective krop coroflot

CSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

Web Design and Development Tutorial 03

Web Development & Design Foundations with HTML5

8a. Cascading Style Sheet

Using CSS for page layout

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

Transcription:

CSS3 Basics From www.w3schools.com & CSS Visual Dictionary Learning Curve Books, LLC

CSS Box Model Margin (top, right, bottom, left) Shorthand property, equivalent to Border-width border-style border-color Border Padding Content Area border: 1px solid gray; width: 300px; height: 100px; background: #eee; box-sizing: content-box padding: 16px; border: 8px; Actual size: 348 (300+16*2+8*2) x 148 (100+16*2+8*2) By default the box-sizing property is for the content-box: box-sizing: [content-box padding-box border-box]

CSS3 Pseudo Selectors Pseudo class: a :keyword added to the end of a selector, to specify styling for a certain state :hover :active :disabled :first-child :nth-child() :root :target Pseudo element: a ::keyword added to the end of a selector, to select a certain part of an element ::after ::before ::first-letter ::first-line ::selection ::backdrop

CSS Selector Pattern Examples div, p /* selects all <div> and <p> elements */ div p /* selects all <p> elements inside <div> elements (descendants) */ div > p /* selects all <p> elements where the parent is a <div> */ div + p /* selects all <p> elements that are immediate sibling */ p ~ ul /* selects all <ul> elements that are preceded by a <p> (general sibling) */ p:first-child /* selects every <p> element that is the first child of its parent p:nth-child(2) /* select every <p> element that is the second child of its parent */ p::first-letter /* selects the first letter of every <p> element

Properties: position static: the default, normal flow, affected by size, but not affected by offset (top/bottom/left/right) relative: relative to its normal position, affected by offset absolute: relative to nearest ancestor, subject to scroll and overlapping fixed: relative to browser window (view port), regardless of scrolling. sticky: toggles between relative and fixed, depending on the scroll position

Properties: display block: starts on a new line, and takes up the whole width inline: no effect for height/weight properties inline-block: as inline, but accepts height/width flex: block-level flex container (grows or shrinks) in one-dimension grid: like flex, but in two-dimension none: element disappears

Text Properties font-family: Arial, sans-serif (fall back) Times New Roman (default) font-size: 16px (default medium size = 12pt = 1em = 100%) font-weight: 100 (thin), 400(regular), 700 (bold), 900 (black) font-style: normal, italic text-align: left (default), center, right text-decoration: overline, underline, line-through overflow: auto, scroll, hidden, visible (default) line-height: normal, 80%, (specifies the vertical spacing)

CSS Alignment Examples Center Align Elements.center { margin: auto; } Center Align Text:.center { text-align: center;} Center an Image img { display: block; margin-left: auto; margin-right: auto; } Left and Right Align (position).right { position: absolute; right: 0px; width: 300px; } Left and Right Align (float).right { float: right; width: 300px; }

Color gradients linear-gradient(black, white) /* top to bottom by default */ linear-gradient(to right, black, white) linear-gradient(to bottom right, black, white) radial-gradient(black, white) radial-gradient(at bottom right, black, white) repeating-linear-gradient(white 100px, black 200px, white 300px) repeating-radial-gradient( )

Background Images background-image: url( image.jpg ) background-repeat: no-repeat (default), repeat-x, repeat-y background-position: left top, center, xpos ypos background-size: auto (default, original size), 100px 100px (specific length) 100% 100% (stretch across all available space), cover (stretch to cover the whole container, may cut off on one side), contain (resize so the whole image is visible within the container) background-attachment: scroll, fixed You can have two background images, if the first image (the top one) has a transparent background background-origin: content-box, padding-box, border-box

Properties: transform transform: translate(x, y), translatex(x), -Y(y), -Z(z) transform: scale(x, y), scalex(x), scaley(y), scalez(z) transform: rotate(angle): angle is in 0-360deg (clockwise) transform: skew(x-angle, y-angle) transform-origin: x, y (the rotation origin)

@-rules Special instructions for the browser in controlling how styles are applied Examples: @import url(style2.css); /* import another stylesheet from within the current stylesheet */ @media print { /* apply this style only for printing */ body { color: #000; background: #fff; } } @font-face { /* embed a custom web font */ font-family6: MyOwn Font ; src: local( MyOwn Font Regular ), url(/fonts/myownfont.ttf); }