CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. August 25, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and CIS.

Slides:



Advertisements
Similar presentations
© 2010 Delmar, Cengage Learning Chapter 9 Positioning Objects with AP Div Tags.
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
© 2011 Delmar, Cengage Learning Chapter 10 Positioning Objects with AP Divs.
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.
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.
Using CSS for Page Layout. Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
MORE Cascading Style Sheets (The Positioning Model)
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
CSS Box Model. What is the CSS Box Model? The “Box Model” is a tool we use to lay out our web pages in a number of individual "boxes" or "containers".
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
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.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Cascading Style Sheets CSS. CSS Positioning Normal Flow Top -> bottom | left -> right Arranged in the order they appear in the code make room for one.
Cascading Style Sheets CSS. div … Used like a container to group content Gives context to the elements in the grouping Give it a descriptive name with.
Tutorial 4 Creating Special Effects with CSS
Technologies for web publishing Ing. Václav Freylich Lecture 7.
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Reference for CIS127 and CIS 137.
Copyright © Terry Felke-Morris CSS Flow & Positioning 1 Copyright © Terry Felke-Morris.
CSS Netcentric. What is CSS O CSS stands for Cascading Style Sheets O Styles define how to display HTML elements O Styles were added to HTML 4.0 to solve.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
 Website development process  CSS  Javascript.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
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.
Web Programming Language CSS – Part 2 Dr. Ken Cosh (CSS II)
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. August 25, 2010—All HTML code brought to XHTML standards.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
Cascading Style Sheets Positioning Controls Visibility.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
Positioning and Printing Creating Special Effects with CSS.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Cascading Style Sheets Positioning Controls Visibility.
CSS Positioning & Layout Creating layouts and controlling elements.
CONTROLLING Page layout
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.
HTML and Dreamweaver November 11th. Agenda Box Model Displaying and positioning elements – Padding – Margin – Float – Display – Position HTML Demo.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Cascading Styles Sheets Positioning HTML elements.
CHAPTER 15 Floating and Positioning. FLOAT VS. POSITION  Floating an element moves it to the left or right, allowing the following text to wrap around.
CSCI N241: Fundamentals of Web Design Copyright ©2006  Department of Computer & Information Science Using CSS for Absolute Layouts.
Cascading Style Sheets for layout
Cascading Style Sheets Layout
CSS Box Model.
CSS Box Model.
CSS Box Model.
CSS Layouts: Grouping Elements
Cascading Style Sheets for layout
The Web Wizard’s Guide To DHTML and CSS
Cascading Style Sheets (Layout)
Putting Things Where We Want Them
Programming the Web using XHTML and JavaScript
MORE Cascading Style Sheets (The Positioning Model)
Web Programming Language
CSS Box Model.
Floating and Positioning
Web Programming Language
CSS Box Model.
Laying out Elements with CSS
CSS Box Model.
CSS Box Model.
Cascading Style Sheets
The div Element and CSS for layout
Presentation transcript:

CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. August 25, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and CIS 137

CSS Visibility Includes clip With CSS clip, you can control exactly which portions of a page element are visible and which are invisible. This property works only on those elements that have been absolutely positioned inside of a DIV first. The clip attribute can be used to mask off parts of an image that you don't want to be seen, like that ex- boyfriend or ex-girlfriend, ex-wife or ex-husband! And you don't even have to do any Photoshop work on the image too! September 22, CSS Styles Clipping by Professor Al Fichera

clip Does Not Affect Layout Clip affects the display of the element, but not the page layout. So, whatever you clip still takes up room on the page. Clip — You specify values for the, Top, Right, Bottom, and Left coordinates to " clip " off content within the AP DIV Element in the same way you'd crop an image in Fireworks or Photoshop. September 22, CSS Styles Clipping by Professor Al Fichera

Measurement Values for clip You could also use any other length units, or even percentage values if you wish. A value of auto means that no clipping will occur. Negative values for clip are permitted. So enough of the basics, let's see how it works next. September 22, CSS Styles Clipping by Professor Al Fichera

clip is a Part of the Visibility Team Remember, the clip property works only on those elements that have been absolutely positioned inside of a div. Here is a blank template example of how to use this feature in your Style Block: #idName{ position: absolute; top: ?px; left: ?px; width: ?px; z-index: 1; clip: rect(?px ?px ?px ?px); } September 22, CSS Styles Clipping by Professor Al Fichera Note: ?px means actual pixels used. And #idName means you pick a name for the ID. Note: ?px means actual pixels used. And #idName means you pick a name for the ID. Remember, when using a string of numbers in CSS, they read as follows: Top, Right, Bottom, and Left sides

Setting Up a clip From an Image September 22, 2010 CSS Styles Clipping by Professor Al Fichera 6 The dimensions of the image I will use in this demonstration of clip has a width="350" and a height="306" It will be important to know these dimensions.

Concept: Separate the Couple September 22, 2010 CSS Styles Clipping by Professor Al Fichera 7 Without damaging the original image, I will only show one person at a time. Of course you could actually destroy the picture, but what if they get back together again. See I'm thinking ahead!

So How Did I Do That? September 22, 2010 CSS Styles Clipping by Professor Al Fichera 8 Let's take a look at his clip values. #theEXhim { position:absolute; width:350px; height:306px; z-index:3; left: 65px; top: 435px; clip: rect(0px 350px 306px 190px); visibility: visible; }

Deconstructing His clip Coding September 22, 2010 CSS Styles Clipping by Professor Al Fichera 9 To be able to clip his image out of the photograph it had to be placed inside of a div and absolutely positioned. #theEXhim { position:absolute; I gave him an id of #theEXhim that way I'd know it was his special code. Note: The width, height, z-index, left and top portions of the code only set up placement on the page, and not really a part of the clip.

Deconstructing His clip Coding September 22, 2010 CSS Styles Clipping by Professor Al Fichera 10 Here is the important his clip code explained. clip: rect(0px 350px 306px 190px); Remember the image is 350px wide and 306px tall. The 1 st number 0px is how much of the top I want to clip out, nothing. The 2 nd number 350px is the far right side to show, everything up to it. The 3 rd number is how much of the bottom do I want to show, all of it. The 4 th number is how much of the left side do I want to hide, just her. 190px

Deconstructing Her clip Coding September 22, 2010 CSS Styles Clipping by Professor Al Fichera 11 Here is the important his clip code explained. clip: rect(0px 190px 306px 0px); Remember the image is 350px wide and 306px tall. The 1 st number 0px is how much of the top I want to clip out, nothing. The 2 nd number 190px is how far to the right to show, just her. The 3 rd number is how much of the bottom do I want to show, all of it. The 4 th number is how much of the left side do I want to hide, none. 190px

Wrapping It Up September 22, 2010 CSS Styles Clipping by Professor Al Fichera 12 See wasn't that easy! What still confused? It's simple, you can hide any portion of an image you want to by figuring out what you don't want to see. Remember the clock, CSS uses 12 the top, 3 the right, 6 the bottom, and 9 the left sides in a string of numbers. What's left well practice will bring the concept home to you, just reading and not doing won't clear anything. Lastly, don't do what the next slide shows, EVER!

Clipping Text Not Advisable! I can't think of one good reason in the world to use clip on a body of text, can you? This is like being brain dead! h4 { position: absolute; top:130px; left:300px; width: 150px; clip: rect(10px 200px 100px 40px); } September 22, CSS Styles Clipping by Professor Al Fichera