CSS - Quiz #4 Lecture Code: 472962

Slides:



Advertisements
Similar presentations
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
Advertisements

1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
Quiz #3 - CSS Lecture Code: Get Neighbors’ URLs for MP1
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
Quiz #4 - Layouts Lecture Code:
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
MORE Cascading Style Sheets (The Positioning Model)
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
Svetlin Nakov Telerik Web Design Course html5course.telerik.com Manager Technical Training
FINAL EXAM REVIEW WEB TECH. JUST CLICK… THE CORRECT ANSWER WILL APPEAR WHEN YOU CLICK. GOOD LUCK!
Cascading Style Sheets 1 Color and Backgrounds. Cascading Style Sheets 2 Color and Backgrounds Computer color basics Expression of color values using.
IMAGES Controlling size of images in CSS Aligning images in CSS Adding background images.
CSS/Photoshop Layouts - Quiz #5 Lecture Code:
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
CIT 256 Organizing Large Websites: Divs, DW Templates Dr. Beryl Hoffman.
HTML - Quiz #2 Attendance CODE:
Cascading style sheets (CSS)
Technologies for web publishing Ing. Václav Freylich Lecture 7.
CSS/Photoshop Layouts – Quiz #7 Lecture Code:
IS1825 Developing Multimedia Applications for Business Lecture 4: CSS Positioning and Flow Rob Gleasure
Copyright © Terry Felke-Morris CSS Flow & Positioning 1 Copyright © Terry Felke-Morris.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
11/6/13 MORE CSS!. TODAY’S AGENDA Review: float for positioning objects Review: CSS and color Introductions to: o CSS and images o CSS backgrounds o CSS.
Adding Graphics to Web Pages. CSS does not have any properties specifically aimed at formatting images Use properties you have already learned, i.e.,
JavaScript – Quiz #9 Lecture Code:
Cascading Style Sheets in.NET Lilian Kiilu, Client/Server & Web Applications, Coms 463/563, Section 1pm, Fall 2005, November 16 th 2005.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Today’s Agenda Course Facilitator Introduction Announcements Quiz Servers and Clients URLs Dreamweaver Setup HTML Introduction – Part 2.
HTML - Quiz #2 Attendance CODE:
Web sites Design: Cascading Style Sheet (CSS) (Cont’d) Dimensions and Position of Elements –Width and Height Space –Table Cell Padding –Left and Top Position.
More CSS.
Today’s Agenda Advanced CSS Techniques Floating Z-index Centering Sliding Doors Fluid Layouts CSS3 Advanced CSS Lab Mini Project #2.
Chcslonline.org Text –wrapping around Images. chcslonline.org To wrap text around an image, lets set up a style in our style sheet. open a new notepad.
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
Small group worksheet Lecture Code:
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Tutorial 4 Creating Page Layouts with CSS
CSS - Quiz #3 Lecture Code:
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 6.
IN THE DOCUMENT OBJECT MODEL, EACH LINE OF HTML IS AN ELEMENT (AN OBJECT), ABLE TO HAVE ATTRIBUTES, PROPERTIES AND VALUES. CSS TELLS THE BROWSER HOW TO.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
- WE’LL LOOK AT THE POSITION PROPERTY AND HOW CSS RESOLVES CONFLICTS BETWEEN STYLING INSTRUCTIONS The position property; CSS specificity hierarchy.
Today’s objectives  Announcements  Positioning  Measurement units.
CIS234A Lecture 6 Instructor Greg D’Andrea. Span and Div The span and div elements are a generic means by which we can add structure to documents. The.
THE NORMAL DOCUMENT FLOW from Quick Tip: Utilizing Normal Document Flow by Alex Rodrigues on Web tuts.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 8.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets Layout
Fixed Positioning.
MORE Cascading Style Sheets (The Positioning Model)
Positioning.
Presentation transcript:

CSS - Quiz #4 Lecture Code:

Today’s Agenda Quiz & Attendance Announcements CSS Position Demo Z-Index CSS / Photoshop Layouts – Part 2 Finish Quiz & Attendance Lab

Announcements

MP2 Clarifications Headings already bold font-weight: normal; sets to default font-weight: bold; doesn’t do anything, since already bold text-align: right; Not: text-align: right justified; CSS Parse Terminates on Errors CSS Code Style Convention with multiple rules div { font-weight: bold; text-align: left; }

CSS Property: z-index Higher numbers stack on top of lower numbers. Object must have position set to relative, absolute, or fixed. If not set, later elements have higher z-index’s that earlier ones. Example: div { position: absolute; z-index: 100; } Common Values: positive integers default earlier later

Review Positioning 4 Types of Positioning Static: Default Relative: Offsets relative to static position Absolute: Offsets relative to closest parent who has position set, otherwise relative to document bounds Fixed: Offsets relative to browser window Absolute and Fixed take up no space

Review Positioning Please see demos Rearranging Facebook DIV Play

Negative Values Negative Values give us even more control Can be applied to Positioning Offsets top, left, right, bottom margins What effect does a negative margin have? right: -Xpx;

Web Design: Basic to Advanced Techniques Spring 2010 Tuesdays 7-8pm 200 Sutardja-Dai Hall CSS/Photoshop Layouts – Part 2

Where Are We? 1. Website Concept/Idea 2. Photoshop Mockup of Layout 3. Layout to HTML 1. Identify DIVs 2. Code DIVs 4. CSS to Layout 1. Positioning 2. Background Images 5. HTML and CSS content for Site 6. JavaScript, PHP, MySQL 7. Launch Site First lecture Not yet, but soon! Prev. and this lecture Prev. lecture and this lecture First few lectures Not yet.

So Far Only Solid Colors… But we want this… Q: How do we get there?

A: Background-Images Where do we see them? Gradients and toolbarsLogos Backgrounds.. of course!Most graphics

vs. background-image tags for instances where the content is the image itself For Example: Profile Pictures Images in a Gallery Background-image for instances where the image is part of the presentation structure For Example: Menu Buttons and Bars Site background Splash pages Container styling

Applying Background-Image CSS Property: background-image Usage: div { background-image: url(/image.png); } Additional properties background-position background-repeat

Background-Images in Practice Typically, not one giant image, but rather sub images This gradient repeats This gradient also repeats Multiple Instances of icon Triangles can’t be made from pure HTML and CSS, must be an image Gradient changes

Background Tiling (-repeat) Opportunities to optimize code Allows variable length of contents Left cap Middle tile Right cap Projects.wrapper { width: auto; }.leftcap { width: 5px; background-image: url(leftcap.gif); }.middle { width: auto; background-image: url(middle.gif); background-repeat: repeat-x; }.rightcap { width: 5px; background-image: url(rightcap.gif); }

Image Types.jpg,.gif,.png JPEG – 16.7M Colors Medium size, medium quality, no transparency GIF – 256 Colors Smaller size, lower quality, transparency, animation PNG – 16.7M Colors Largest size, best quality, transparency Tradeoffs…

Not All Transparencies are Equal Please see demo PNG-24, GIF matted white, JPG quality 5 PNG is true transparency under all conditions GIF is transparent if we know the background color it will be placed over JPG is not transparent For basic images PNGs can be small! 28k for PNG, 48k for GIF, 108k for JPG

Use Case for Images Do we need transparency? JPEG Do we know the background color of the object we’ll place our image on top of? GIFPNG yesno yesno

Photoshop Layout to HTML/CSS Previously… we dissected our layouts into DIV’s Now… we dissect our DIV’s into images

Save For Web in Photoshop

Save For Web in Photoshop …continued

CSS - Quiz #4 Lecture Code: Then… Lab

Citation (websites in this lecture)