Web Design with CSS and CSS3. Dr. Jan Stelovsky

Similar documents
Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Outline of CSS: Cascading Style Sheets

ITNP43: HTML Lecture 4

{color:blue; font-size: 12px;}

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

Using Style Sheets for Consistency

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

CSS - Cascading Style Sheets

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Contents. Downloading the Data Files Centering Page Elements... 6

CST 150 Web Design I CSS Review - In-Class Lab

Web Design for Print Designers WEB DESIGN FOR PRINT DESIGNERS: WEEK 6

Web layout guidelines for daughter sites of Scotland s Environment

Further web design: Cascading Style Sheets Practical workbook

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Introduction to Adobe Dreamweaver CC

Responsive Web Design: Media Types/Media Queries/Fluid Images

Style & Layout in the web: CSS and Bootstrap

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

JJY s Joomla 1.5 Template Design Tutorial:

Mobile Web Site Style Guide

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

Creating Web Pages with Dreamweaver CS 6 and CSS

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 2

Slicing and Coding the Navigation Background in CSS

Responsive Design

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Creating the Surf Shop website Part3 REVISED

Web Authoring CSS. Module Descriptor

Responsive Web Design Creative License

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

CHAPTER 10. When you complete this chapter, you will be able to:

Selectors in Action LESSON 3

CSS for Page Layout. Key Concepts

Creating a Resume Webpage with

Base template development guide

Contents. Introduction Downloading the Data Files... 2

HTML5 and CSS3 Design with CSS Page 1

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

HTML and CSS. Elliot Davies. April 10th,

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Full report on all 24 clients

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

Website Development. 2 Text. 2.1 Fonts. Terry Marris September We see how to format text and separate structure from content.

LaGuardia Community College Thomson Ave, Long Island City, New York Created by ISMD s Dept. Training Team. Overview

MCH Strategic Data Best Practices Review

Using an external style sheet with Dreamweaver (CS6)

Web Design and Development ACS Chapter 9. Page Structure

CIS 467/602-01: Data Visualization

ICE: HTML, CSS, and Validation

Simply download Beepip from and run the file when it arrives at your computer.

Making Responsive s

Web Design & Development - Tutorial 04

Building a Horizontal Menu in Dreamweaver CS3 Using Spry R. Berdan

BlueHornet Whitepaper

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Web Development 1 A4 Project Description Web Architecture

Sizmek Features. Wallpaper. Build Guide

GUIDE TO CODE KILLER RESPONSIVE S

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

Magento Responsive Theme Design

Create Your own Company s Design Theme

Microsoft Expression Web Quickstart Guide

Table of Contents Find out more about NewZapp

Coding Standards for Web Development

Introduction to Cascading Style Sheets

A send-a-friend application with ASP Smart Mailer

Stylesheet or in-line CSS CSS attributes, used in stylesheets or in-line, can define:

Create Webpages using HTML and CSS

Campaign Guidelines and Best Practices

Cascading Style Sheets (CSS)

How to Properly Compose HTML Code : 1

Table of Contents THE DESIGNER S GUIDE TO CREATING NEWZAPP DRAG AND DROP TEMPLATES... 6 THE NEWZAPP SYSTEM... 7

Print all 18 Chapters - CSS Basics

Colgate University Website Content Style Guide

With mobile devices and tablets becoming popular for browsing the web, an increasing number of websites are turning to responsive designs to

COMMONWEALTH OF PENNSYLVANIA DEPARTMENT S OF Human Services, INSURANCE, AND AGING

Flare Tips and Tricks. Tips and tricks. Importing content Lists. Variables and snippets Condition tags Printed documentation WebHelp.

Citywide User Experience Design Guidelines: NYC.gov Style Guide. Final Public 11/8/2013

Positioning Container Elements

Website Builder Documentation

Klik op deze albums als u de foto s van onze evenementen wil ontdekken.

<Insert Picture Here>

Joomla Article Advanced Topics: Table Layouts

How to craft a modern, mobile-optimized HTML template. Jason Samuels, NCFR IT Manager DrupalCamp Twin Cities May 2012

Chapter 8 More on Links, Layout, and Mobile Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Level 1 - Clients and Markup

Web Publishing Basics 2

Designing HTML s for Use in the Advanced Editor

CSS Techniques: Scrolling gradient over a fixed background

C:\wamp\www\webdok\07bootstrap\bootstrap dist\css\bootstrap.css 2. juli :18

Code View User s Guide

Web Developer Jr - Newbie Course

Transcription:

Web Design with CSS and CSS3 Dr. Jan Stelovsky

CSS Cascading Style Sheets Separate the formatting from the structure Best practice external CSS in a separate file link to a styles from numerous pages Style classes and rules h1 { font-size: 18px; style class h1 rule key font-size rule value 18px

Sample Page with CSS Page file, e.g. 'index.html': <html><head> <title>page with CSS</title> <link rel="stylesheet" type= text/css" href="mystyle.css /> </head><body> <h1>title</h1> <div class="content"> <p id="aloha">aloha</p> Friends of ICS </div> </body></html> CSS file, e.g. mystyle.css': * { margin: 10px 20px; padding: 0; body { font-family: Arial, sans-serif; font-size: 14px; h1 { font-size: 18px;.content { display: block; #aloha { font-weight: bold; color: orange;

font-family: Text Rules Arial, Helvetica, sans-serif; preferable, more readable "Courier New", Courier, monospace; "Times New Roman", Times, serif; font-size: 12px; 1.2em; preferable units are em (design for different media) font-weight: bold; font-style: italic; line-height: color: red, orange, aqua, etc. #ab34d2 (in hex: ab red, 34 green, d2 blue component) rbga(128,128,128,0.5) gray, 50% transparent text-shadow: 5px 2px 3px blue; 5px to the left, 2px down, 3px blur and blue text-align: center, left, right works for other elements, too text-decoration: none; good for links without underline (use color, bold font, etc. instead)

Colors

Appearance Rules visibility: hidden; opacity: 0.2 20% opaque (barely visible) border: 3px solid #aaa; width, then type, then color outline: similar to border: but outside (better), cons: no rounded corners cursor: pointer, text, crosshair, progress, etc. background-color: rgb(20,255,255); background: good for sprites! url(my_pic.jpg) -35px 20px no-repeat background-image: url(my_pic.jpg) background-position: relative to image -35px 20px 35px from top, 20px from left (negative!) background-repeat: no-repeat, repeat-x, repeat-y, default repeat, repeats horizontally and vertically

Element Layout Rules width: 750px; 70%; of parent block height: padding: 25px; 25 pixels top, right, bottom, and left margin: 0; no margins 10px 5px 20px 0; 10px top, 5px right, 20px bottom, 0 left margin-left:, margin-right: 0 auto; centers horizontally

Parent-related Layout Rules position: with respect to surrounding block static; default, ignores most other positioning rules, e.g. top beware! relative; to parent and previous element absolute; relative to parent only fixed; in browser's window, doesn't scroll with page display: block; occupies entire width, fills it inline; lets in other elements horizontally inline-block; horizontally with other elements, occupies width it needs list-item; as item in an <ul> list (as bullet) none; hidden float: left, right, center clear: both; stops floating top:, right:, bottom:, left: z-order: rules overlapping visibility, 1000 overlaps all below 1000

Special CSS special style (pseudo) classes a:hover { when cursor is over the element a:active { when being clicked a:visited { after used input:focus { when text field is selected input:checked { when checkbox/radio button is selected button:enabled { button:disabled { div:first-child {, div:last-child { div:n-th-child(4) { 4 th child of parent p:first-letter { good for big starting letter special rule attributes important! overrides other rules inherit

Style Class Formats & Chaining h1{ HTML elements, e.g. <h1>.my_class{ elements with a class attribute, e.g. <p class="my_class"> #my_id{ element with a id attribute, e.g. <p id="my_id"> h2,.my_class{ or ; e.g. h2 or.my_class.my_class p{ within; e.g. p inside.my_class.my_class > p{ child; e.g. p child of.my_class.my_class + p{ follows as direct sibling; e.g. p that follows.my_class.my_class - p{ precedes some sibling; e.g. p that precedes.my_class

Sample Style Sheet body { background: orange; color: purple; font-family: times new roman, serif; margin-left: 10%; margin-right: 10%; body { background: white; color: black; h1, h2, h3, h4, h5, h6, h7 { color: midnight blue; background: none; font-weight: bold; text-align: center; ul, ol, dl, p { margin-left: 6%; margin-right: 6%; ul ul, table ol, table ul, dl ol, dl ul { margin-left: 1.2em; margin-right: 1%; padding-left: 0;

Precedence 1. style=" " attribute in HTML element 2. <style> element on page 3. external CSS file 1. #my_id id-relative 2..my_class class-relative 3. h1 HTML-element-relative what comes later

CSS3 media queries responsive design (e.g. for mobile) table-related display rules columns round corners text shadow, outline, rotation gradients animations and transitions (3D!) relative selectors

Resources css-tricks.com treasure chest of how-to-do (and tricks) 10 Reasons Why CSS Sucks old but not outdated; good read (if you've got the time) not because of the rants, but because the comments mention a lot of necessary hacks, so that you can google them how to find a solution that may save you hours the usual suspects MDN best for detailed specs W3Schools simpler, but often to simplicistic, lacks details stackoverflow.com great resource for complex issues, great advice by experts often snooty don't ask help for homework there W3C official, but tedious, last resort