Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.

Slides:



Advertisements
Similar presentations
Chapter 1: Introduction. Contents Whats New in Dreamweaver CS4? The Dreamweaver CS4 Interface Setting Up a Site Creating a Web Page Adding Text to Your.
Advertisements

© 2010 Delmar, Cengage Learning Chapter 9 Positioning Objects with AP Div Tags.
© 2010 Delmar, Cengage Learning Chapter 5 Positioning Objects with CSS and Tables.
Chapter 3 – Web Design Tables & Page Layout
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
© 2011 Delmar, Cengage Learning Chapter 10 Positioning Objects with AP Divs.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Tutorial 6 Creating Fixed-Width Layouts
Chapter 3 Working with Text and Cascading Style Sheets.
AD Intermediate Computer Graphics | spring 2008 | Daria Tsoupikova | School of Art and Design | UIC CSS Cascading Style Sheets.
Ch. 6 Web Page Design – Absolute Positioning, Image Maps, and Navigation Bars Mr. Ursone.
Chapter 3 Tables and Page Layout
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Working with Text and Cascading Style Sheets Adobe Dreamweaver Chapter 3.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Organizing Content by Using Dreamweaver CS5 Domain 5.
© 2010 Delmar, Cengage Learning Chapter 7 Using Styles and Style Sheets for Design.
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.
Chapter 3 Working with Text and Cascading Style Sheets.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
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.
Website Development with Dreamweaver
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Link-Images. Understanding Links  Absolute Links: – URL is an absolute link—it’s the complete, unique address for a single page. Ex: – use absolute links.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
Introducing Cascading Style Sheets. Cascading Style Sheet Basics  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles.
Web Design Part I. Click Menu Site to create a new site root.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
Tutorial 3 Adding and Formatting Text with CSS Styles.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
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.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
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.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Positioning Objects with CSS and Tables
Today’s objectives  Announcements  Positioning  Measurement units.
Web and Multimedia Development Copyright © Genetic Computer School 2007WM LESSON OVERVIEW  Use of Tables  Creating Tables  Try It – 1  Creating.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
Laying out Elements with CSS
Working with Cascading Style Sheets
Positioning Objects with CSS and Tables
Styles and the Box Model
Tutorial 6 Creating Dynamic Pages
Working with Text and Cascading Style Sheets
Using Cascading Style Sheets (CSS)
Floating and Positioning
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Positioning Objects with CSS and Tables
Presentation transcript:

Advanced CSS - Page Layout

Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such as the “pseudo-class” styles or the descendent selectors.  In the CSS there are a variety of these advanced selectors but in Dreamweaver, all of them are created in the same way Start by creating a CSS style.

Advanced CSS  When you open New CSS Rule window, instead of selecting the Class, ID, or Tag selector type, choose the Compound option.

Advanced CSS  Except the four link state options in the drop-down menu, you must type the selector name in the Selector Name box.  You need to use a different syntax for each type of selector.  Descendent Selectors: If a tag is inside another tag, it’s a descendent of that tag.

Advanced CSS  EX: On your web page have, you want to emphasize a word within :  You select the word and press the B button, it applies the tag to that word.  Most browsers display both tags, so you can’t see any difference between the emphasized word and the other words in the headline.

Advanced CSS  Creating a tag selector to change the tag’s color and make it stand-out from the headline isn’t much of a solution:  You end up changing the color of every tag on the page, like it or not.  A descendent selector lets you do what you really want: change the color of the tag only when it appears inside of an tag.  The descendent selector is h1 strong

Advanced CSS

 A descendent selector can contain more than just two elements as well. The following are all valid selectors for the tags inside the bulleted lists.  ul li a  body li a  html li a  html body ul li a

Advanced CSS  Styling Groups of Tags: To create a style that applies to several different elements at once, In the Selector Name box, type a list of selectors separated by commas.

Advanced CSS  Fast Style Editing With the Properties Pane: The Properties pane displays CSS properties in one of three different views:  A “set properties” view: displays only the properties that have been define  A Category view: groups the different CSS properties into the same seven categories used in the Rule Definition window  A List view: provides an alphabetical listing of all CSS properties for the selected style

Advanced CSS

 Moving and Managing Styles: To move a style from one place to another in the same style sheet:  Drag the style in the CSS Styles panel. The order the styles are listed in the CSS Styles panel represents their order in the actual CSS  You can select and move more than one style at a time by Ctrl-clicking

Advanced CSS  EX:

Advanced CSS  To move one or more styles between two style sheets:  Drag the style from one style sheet to another in the CSS Styles panel.  This is applied both for moving a style from an internal style sheet to an external style sheet, and for moving a style from one external style sheet to another

Advanced CSS  The Cascade: The page has two different styles, two sets of formatting rules for the same tag. The browser merges the three styles into a sort of hybrid, following these rules:  Properties that don’t conflict are applied as usual.  Properties do conflict, the Web browser uses the property from the style with the greatest specificity.

Page Layout  Types of Web Page Layouts: Float- based layouts offer three basic approaches to this problem:  Fixed width  Liquid  Elastic

Page Layout  Float Layout Basics: Float-based layouts take advantage of the CSS float property to position elements side by side, and create columns on a Web page.  In essence, the float property moves a page element to the left or the right.  Any HTML that appears after the floated element moves up on the page, and hugs up against the side of the float.

Page Layout  Float is a CSS property, available when you create a CSS style.  It’s listed in the CSS Rule Definition window’s Box category  Choose the “left” option, and the styled element floats to the left,  Choose the “right” option and the element moves to the right.

Page Layout  Fixed

Page Layout  Liquid

Page Layout  Elastic

Page Layout  With the fixed-width approach, you don’t have to worry about what happens to your design on a very wide (or small) monitor.  Liquid: Your page gets wider or narrower as your visitor resizes the window.  Elastic: With this kind of design, you define the page’s width using em values. An em changes size when the browser’s font size changes.

Page Layout  The Mighty Tag: With CSS, the most common element for organizing content is the tag.  The tag is an HTML element that has no inherent formatting properties you use it to mark a logical grouping of elements, or a division, on the page.

Page Layout

 The Insert Div Tag Tool: lets you wrap a tag around a selection of page content  To use this tool, either select the content you wish to wrap with a div or click on the page where you wish to insert an empty tag.  Then click the Insert Div Tag button on the Layout category of the Insert panel

Page Layout  You can also insert a div by choosing Insert ➝ Layout Objects ➝ Div Tag.  In either case, the Insert Div Tag window appears

Page Layout  Choose a class from the Class menu or choose an ID from the ID menu.

Page Layout  Ex: To create a two-column design, you could follow these easy steps:  Select the contents of the banner. Then, on the Layout category of the Insert panel, click the Insert Div Tag button.  In the ID box, add an ID name.  Click OK to close the Insert Div Tag window

Page Layout  Select the contents of the sidebar, and then, in the Insert bar, click the Insert Div Tag button.  Click the New CSS Style button, and create a new ID style named #storyLinks  In the CSS Rule Definition window, click the Box category, and then, from the float menu, select “left”

Page Layout  Type a value in the Width box  Complete the style, and then insert the div  Follow the same steps for the main content div: Select the page elements that form that main content on the page, click the Insert Div Tag button, and then create a new ID style for the page’s main content region.

Page Layout

 Understanding the Box Model: CSS properties located within this category: width, height, padding, margin, and clear.  Width and height: specify the width and height for any styled object using these properties.  Float: move an object to the left or right side of a page and have other content wrap around it.

Page Layout  Clear: Clear prevents an element from wrapping around any object with a right or left Float property.  Padding: Padding is the gap that separates the content of the styled tag.  Margin. The margin is the outermost space surrounding an element.

Page Layout

Dreamweaver’s CSS Layouts  Dreamweaver’s CSS Layouts are simply basic designs. Each layout is a simple HTML file and a style sheet.  Creating a new CSS layout page takes just a few steps:  Choose File ➝ New.  Choose Blank Page from the left column, and the type of page you wish to create in the Page Type column.

Dreamweaver’s CSS Layouts

 From the Layout column, select a page layout.  Choose a DocType from the DocType menu.  From the Layout CSS menu, select where to store the layout’s CSS code.  Click the “Attach Style Sheet” button to attach any external style sheets to the page  Click the Create button to bring your new Web page to life

Dreamweaver’s CSS Layouts  The Structure of Dreamweaver’s CSS Layouts

Absolute Positioning (AP)  Beyond float-based layouts, CSS’s other main technique for placing elements on a Page Absolute positioning lets you specify an exact position on a page for any element.  Web is a environment that’s difficult to control with pixel level precision.  If increase the font size in the browser, the enlarged text may spill out of your carefully crafted layout.

The CSS Positioning Properties  Positioning type:  Absolute is the most common option. It lets you place a tag anywhere on a page.  Relative: lets you position a tag relative to its position in the HTML.  Static: is the normal behavior of HTML. Static simply means the content follows the normal top-down flow of HTML.

The CSS Positioning Properties  Fixed is similar to the “fixed” value of the CSS attachment property used to lock a background image in place.  Width and height: set the width and height of the element  Visibility: Dreamweaver makes the contents of all tags visible on the page.  Z-index: represented by a number in the Z index field, controls the stacking order of AP elements on a page.

The CSS Positioning Properties  Placement: specify an absolutely positioned element’s position which is, after all, the whole point of AP div.  The four properties control where each of the four edges of the AP div begin.

Adding an AP Div to Your Page  Drawing AP Divs:  Click the AP div button, and then drag the + cursor diagonally in the document window to create a box.  Use a menu command: at the insertion point, choose Insert ➝ Layout Objects ➝ AP Div.

The AP Elements Panel  The AP Elements panel: manage absolutely positioned elements in a document.

The AP Elements Panel  Visibility: To change an absolutely positioned element’s visibility property  AP element ID: If you use Draw AP div tool, Dreamweaver gives the AP div a generic ID name.  Z-index: provides a third dimension to absolutely positioned elements.