CGS 3175: Internet Applications (CSS – Page Layout) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 Cascading Style Sheets – Page Layout.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
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 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
CGS 3175: Internet Applications (In-class Practice) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 CSS In-class Practice School of Electrical.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
CSS provides a way to stray away from the traditional methods of using tables to lay out pages. Success with this technique depends on understanding of.
CSS, cont. October 12, Unit 4. Creating a Sidebar We know how to create a sidebar –Use the float property div#sidebar{ float: left; } Item1 Item2 Item3.
1 CSS more details Reasons to use CSS for page layoutReasons to use CSS for page layout Relative and absolute positioningRelative and absolute positioning.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
MORE Cascading Style Sheets (The Positioning Model)
4.01 Cascading Style Sheets
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Doman’s Sections Information in this presentation includes text and images from
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.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Web Programming Language CSS – Part 2 Dr. Ken Cosh (CSS II)
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Web Development & Design Foundations with HTML5 7th Edition
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Foundations MONDAY, OCTOBER 7, 2013 LECTURE 7: CSS LINK COLORS, INTERMEDIATE CSS.
Cascading Style Sheets (CSS) Part II IT210: Web-based IT.
آموزش طراحی وب سایت جلسه پنجم– سی اس اس 2 تدریس طراحی وب برای اطلاعات بیشتر تماس بگیرید تاو شماره تماس: پست الکترونیک :
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
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.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
Working with Cascading Style Sheets
Cascading Style Sheets Layout
Web Development & Design Foundations with XHTML
4.01 Cascading Style Sheets
Webpage layout using CSS
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
The Internet 10/25/11 XHTML Tables
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Creating Layouts Using CSS
MORE Cascading Style Sheets (The Positioning Model)
DynamicHTML Cascading Style Sheet Internet Technology.
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Web Development & Design Foundations with H T M L 5
DynamicHTML Cascading Style Sheet Internet Technology.
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with HTML5
4.01 Cascading Style Sheets
Presentation transcript:

CGS 3175: Internet Applications (CSS – Page Layout) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 Cascading Style Sheets – Page Layout - Part 2 School of Electrical Engineering and Computer Science University of Central Florida Instructor : Dr. Mark Llewellyn HEC 236,

CGS 3175: Internet Applications (CSS – Page Layout) Page 2 © Mark Llewellyn Elements that seem to float on the right or left side of either the browser window or another element are often configured using the float property. The browser renders these element using normal flow, and then shifts them as far as possible within their container (usually either the browser window or a ) to either the right or left. Other content will flow around the float. To stop this flow, use the clear property. The float Property (cont.)

CGS 3175: Internet Applications (CSS – Page Layout) Page 3 © Mark Llewellyn <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " CSS Float Property - Example 1 h1 { background-color:#cccccc; padding:5px; color: #000000; } p { font-family:Arial,sans-serif; } #picture {float:right; margin: 0 0 5px 5px; border: solid; } Floating an Image The heading and paragraph follow normal flow. The racer pictured on the right is Axel Merckx. He is the son of world famous cyclist Eddy Merckx. This year Alex rode for the T-Mobile team in Germany. Style for the floating image. element with alternate text display.

CGS 3175: Internet Applications (CSS – Page Layout) Page 4 © Mark Llewellyn The float Property

CGS 3175: Internet Applications (CSS – Page Layout) Page 5 © Mark Llewellyn There are times when you want to clear the effect of a float. In these cases you use the clear property. The screen shot on the next page shows a page with three images configured with f loat:right. Notice that each one aligns as far to the right as is available instead of lining up vertically down the right margin. By using the clear property to set clear:right, the images each clear the float that precedes them and float to the right of the page as desired. This is shown on page 8. The float and clear properties will be very useful when configuring page layouts with multiple columns as we will see later. The clear Property

CGS 3175: Internet Applications (CSS – Page Layout) Page 6 © Mark Llewellyn The clear Property

CGS 3175: Internet Applications (CSS – Page Layout) Page 7 © Mark Llewellyn CSS float And clear Properties <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " CSS Float Property - Example 2 p { font-family:Arial,sans-serif; }.rightfloat {float:right; margin:5px; /* clear: right; */ border:solid; } The paragraphs follow normal flow. The racer pictured on the right is Axel Merckx. He is the son of world famous cyclist Eddy Merckx. This year Alex rode for the T-Mobile team in Germany. The paragraghs follow normal flow. This is Cat Osterman, arguably the greatest softball pitcher in the world. She is currently a USA Olympic team member and plays for the Rockport Thunder in NPFS. The paragraphs follow normal flow. This is Alex the Parrot. Alex had a vocabulary of about 150 words, but was exceptional in that he appeared to have understanding of what he said. When Alex would grow tired of being tested he would say " I'm going to go away.". If the researcher expressed sadness at this, Alex would add " I'm sorry!" Property set to float right Uncomment this line to see the effect of the clear. This is shown on the next page.

CGS 3175: Internet Applications (CSS – Page Layout) Page 8 © Mark Llewellyn CSS float And clear Properties

CGS 3175: Internet Applications (CSS – Page Layout) Page 9 © Mark Llewellyn Remember from our earlier discussions of XHTML that come elements, such as the paragraph and heading elements are block elements. A division is also a block element. The browser renders these elements beginning and ending on their own line – forming a “block”. Other elements, such as anchor tags and font tags are rendered directly inline – with no line break before or after them. These are inline elements. The display property configures how and if an element is displayed. An element configured with display:none will not be displayed. This is sometimes useful when configuring styles to print a Web page. We’ll see an example of this later. An element configured with display:block will be rendered as a block element (even if it is actually an inline element, such as an anchor tag). The display Property

CGS 3175: Internet Applications (CSS – Page Layout) Page 10 © Mark Llewellyn The z-index property is used to modify the stacking order of elements on a Web page. When using only XHTML there is no easy way to “stack” elements other than configuring backgrounds for pages or tables. The z-index property provides flexibility in the display of elements. The default z-index value is “0”. Elements with higher z- index values will appear stacked on top of elements with lower z-index values rendered on the same position of the page. The Web page shown on the next page is configured using absolute positioning and z-index properties. The XHTML code is shown on page 12. The z-index Property

CGS 3175: Internet Applications (CSS – Page Layout) Page 11 © Mark Llewellyn <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " CSS z-index Property p { font-family:Arial,sans-serif; } #axel {position:absolute; left:100px; top:100px; width:300px; z-index:1; } #cat {position:absolute; left:160px; top:110px; width:300px; z-index:2; } #alex {position:absolute; left:220px; top:120px; width:300px; z-index:3; }

CGS 3175: Internet Applications (CSS – Page Layout) Page 12 © Mark Llewellyn <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " CSS Float Property - Example 2 p { font-family:Arial,sans-serif; } #axel {position:absolute; left:100px; top:100px; width:300px; z-index:3; } #cat {position:absolute; left:160px; top:110px; width:300px; z-index:2; } #alex {position:absolute; left:220px; top:120px; width:300px; z-index:1; }

CGS 3175: Internet Applications (CSS – Page Layout) Page 13 © Mark Llewellyn 12.Using five different image files, create a Web page that looks like the one shown on page 14. Use CSS-P to produce this rendering. 13.Using XHTML and CSS, code a “splash page” for a Web site that looks like the one on page 15. The storyboard for this page is shown below. (A “splash page” is a client-server term for an application that displays an introductory (or splash) screen while the application loads. Splash pages, sometimes called splash screens, can set the tone or introduce a Web site. Things to Try Yourself Image #1 Image #2 Splash logo Image #3 Enter

CGS 3175: Internet Applications (CSS – Page Layout) Page 14 © Mark Llewellyn Things to Try Yourself

CGS 3175: Internet Applications (CSS – Page Layout) Page 15 © Mark Llewellyn Things to Try Yourself