Layout with Layers and CSS

Similar documents
Dreamweaver Template Tutorial - How to create a website from a template

Taking Fireworks Template and Applying it to Dreamweaver

COMSC-031 Web Site Development- Part 2

To illustrate how to set TAG styles the <body> and <h1> tags (for the BODY and the HEADING 1 styles) will be adjusted.

How to lay out a web page with CSS

CSS worksheet. JMC 105 Drake University

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder.

Creating Forms. Starting the Page. another way of applying a template to a page.

How to lay out a web page with CSS

Getting Started with Eric Meyer's CSS Sculptor 1.0

ITSE 1401 Web Design Tools Lab Project 4 (Expression Web 4 - Units M, N, O, P) Last revised: 1/9/14

ORB Education Quality Teaching Resources

Table Basics. The structure of an table

Dreamweaver CS3 Lab 2

Dreamweaver CS4: Layout Guide. Převzato z

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

CS Multimedia and Communications. Lab 06: Webpage Tables and Image Links (Website Design part 3 of 3)

FrontPage 2000 Tutorial -- Advanced

Dreamweaver Basics Outline

Dreamweaver CS5 Lab 2

Create a Web Page with Spry Navigation Bar. March 30, 2010

Designing the Home Page and Creating Additional Pages

ICT IGCSE Practical Revision Presentation Web Authoring

Dear Candidate, Thank you, Adobe Education

McMaster Brand Standard for Websites

Working with Rounded Corner Layouts in CSS Sculptor 2.0

How to lay out a web page with CSS

Step 1 Download and Install KompoZer Step by step instructions to build your first web page using KompoZer web editor.

Microsoft Expression Web Quickstart Guide

COMSC-031 Web Site Development- Part 2. Part-Time Instructor: Joenil Mistal

Client Interview. Interview Topics. Goals and Target Audience. Activity 3.1 Worksheet. Client Name:

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

ICT IGCSE Practical Revision Presentation Web Authoring

Using Dreamweaver CS6

ADOBE 9A Adobe Dreamweaver CS4 ACE.

Dreamweaver CS5 Lab 4: Sprys

Getting Started with CSS Sculptor 3

Introduction to Dreamweaver CS3

Lab 2: Movie Review. overview.png background.png rottenbig.png rbg.png fresh.gif rotten.gif critic.gif

ADOBE DREAMWEAVER CS4 BASICS

Web Publishing Basics II

Adobe Dreamweaver CC 17 Tutorial

How to create and edit a CSS rule

Dreamweaver Basics Workshop

Creating your first website Part 4: Formatting your page with CSS

Styles, Style Sheets, the Box Model and Liquid Layout

Page Layout Using Tables

Project 1: Creating a Web Site from Scratch. Skills and Tools: Use Expression Web tools to create a Web site

Dreamweaver Tutorial #2

Intermediate Web Publishing: Working with Styles

P3e REPORT WRITER CREATING A BLANK REPORT

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

White Paper April Using Cascading Style Sheets (CSS) with AR System 6.x

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

HIERARCHICAL ORGANIZATION

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

What do we mean by layouts?

Adobe Dreamweaver CS5 Tutorial

Activity 4.1: Creating a new Cascading Style Sheet

Create a three column layout using CSS, divs and floating

Introduction to CSS. 2 Sep 13. Derek Peacock. An introduction to defining CSS style rules using tags, classes and ids.

Dreamweaver MX The Basics

Netscape Composer: Working with Tables

Hands On: Dreamweaver CS3 NEW SPRY Widgets

How to set up a local root folder and site structure

Introduction to WEB PROGRAMMING

JSN Sun Framework User's Guide

Objective % Select and utilize tools to design and develop websites.

What is the Box Model?

Using CSS for page layout

Using Dreamweaver CS6

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST

Editing your SiteAssist Professional Template

Note: The screenshots in this document were taken on Windows in Firefox, which may differ from your system.

Lab 1: Introducing HTML5 and CSS3

Gdes2000 Graphic Design for Internet & MM. Dreamweaver: Simple page construction with DIVs.

When you complete this chapter, you will be able to:

Figure 1 Properties panel, HTML mode

Introducing Cascading Style Sheets. Cascading Style Sheet Basics Creating Styles Using Styles Manipulating Styles Text Formatting with CSS

Cascading Style Sheets Level 2

Creating and Publishing Faculty Webpages

HTML5: Adding Style. Styling Differences. HTML5: Adding Style Nancy Gill

Introduction to Computer Science Web Development

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

HTML and CSS a further introduction

Document Formatting with Word

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

ADOBE Dreamweaver CS3 Basics

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

Dreamweaver CS 5.5. University Information Technology Services. Training, Outreach, Learning Technologies, and Video Production

Sign in and join ADC Newsletters Feedback. Creating your first website Part 2: Creating the page layout

Title and Modify Page Properties

Learning Adobe DreamWeaver CC. Module 1 Contents. Chapter 1: Introduction to DreamWeaver CC

AGENDA :: MULTIMEDIA TOOLS :: (1382) :: CLASS NOTES

Tutorial 4. Activities. Code o Editor: Expression Web o Focus : Base Layout, navigation with folders, external stylesheets, Open up Expression Web

CSS Cascading Style Sheets

USER GUIDE MADCAP FLARE Tables

About Freeway. Freeway s Tools and Palettes

Transcription:

Layout with Layers and CSS Today we're going to make a Web site layout. Preparatory Step 1. Inside your folder create a new folder and name it layout. 2. Inside the layout folder create a new folder and name it images. 3. From the calendar on my website download gradient1.png and gradient3.jpg and save them to the My Documents\Your Folder\Layout Images folder. 4. Open Dreamweaver. Go to Site>New Site and create a new site named layout yourname. 5. Select the layout folder for the root and the image folder inside for the images. Step One: Create the Body First, we'll set up a gray background behind it all, and set the font style. 1. Create a new, blank HTML document in Dreamweaver. 2. Save the file as index.html inside your layout. 3. In the Document tool bar, change the Title to CSS Layers. 4. Show the CSS Styles panel and click on the New CSS Rule icon. Use these settings and click OK: a. Selector Type: Tag b. Tag: body c. Define in: (New Style Sheet File) 5. Save the style sheet file as main.css in your CSS Layers folder. 6. In the CSS Rule definition for body box, use these settings and click OK: Category Setting Value Type Font Verdana, Arial, Helvetica, sans serif Size 10 pixels #000000 color: #cccccc 7. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 1

Step Two: Create the Outer Container Next, we'll create the large white rectangle that contains everything else. Using this layer outside of the layer in step three will create a nice, 15-pixel white border. 1. Click inside the page. 2. In the CSS Styles panel, click on the New CSS Style icon. 3. In the New CSS Rule box, use these setting and click OK: b. Tag: #container 4. In the CSS Rule definition for #container box, use these settings and click OK twice: color: Box Width 720 pixels Padding (UNCHECK same for all) Top 0 Margin (UNCHECK same for all) Top 0 Right Bottom 0 Left Auto Auto Border (same for all) Style solid Width 15 pixels 5. Choose the following menu command: Insert > Layout Objects > Div Tag. 6. In the dialog box, select ID: container. 7. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 2

Step Three: Create the Header Here we'll create a header area in which a banner image could go later. It will have a baby blue background and have a 1-pixel white bottom border. 1. Click inside the #container layer. Delete the text that automatically filled the layer but leave your cursor inside the layer. 2. In the CSS Styles panel, click on the New CSS Style icon. 3. In the New CSS Rule box, use these setting and click OK: b. Tag: #header 4. In the CSS Rule definition for #header box, use these settings and click OK twice: color: #22b5ff Box Width 720 pixels Height Border (UNCHECK same for all in all 3 columns) Bottom Style solid Width 220 pixels 1 pixel 5. Let's use a shortcut to insert the Div tag: a. In the Insert Panel, change the dropdown to Common. b. Click on the Insert Div Tag icon (the sixth one.) 6. In the dialog box, select ID: header. 7. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 3

Step Four: Create the Navigation Area We need a rectangle below the banner for links. It will have a dark blue background and white text. It will also have a 1-pixel white bottom border, and 10 pixels of padding around its text. First, we need to tell Dreamweaver precisely where to put it by viewing the code. 1. Click on the Code button on the Document tool bar. 2. Find this bit of code and click just before it: </div> </body> </html> 3. Click on the Design button on the Document tool bar. 4. In the CSS Styles panel, click on the New CSS Style icon. 5. In the New CSS Rule box, use these setting and click OK: b. Tag: #navigation 6. In the CSS Rule definition for #navigation box, use these settings and click OK twice: Type color: #005ac9 Box Width 700 pixels Height 20 pixels Padding (same for all) Top 10 Border (UNCHECK same for all in all 3 columns) Bottom Style solid Width 1 pixel 7. In the Insert Panel, click on the Insert Div Tag icon. 8. In the dialog box, select ID: navigation. 9. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 4

Step Five: Create the Lower Container Now we'll create the main content rectangle. It won't be visible by itself, but it is necessary as a frame for the multi-colored columns. 1. Click on the Code button on the Document tool bar. 2. Find this bit of code and click just before it: </div> </body> </html> 3. Click on the Design button on the Document tool bar. 4. In the CSS Styles panel, click on the New CSS Style icon. 5. In the New CSS Rule box, use these setting and click OK: b. Tag: #local-container 6. In the CSS Rule definition for #local-container box, use these settings and click OK twice: Category Setting Value Type #000000 Box Width 720 pixels Positioning Type relative 7. In the Insert Panel, click on the Insert Div Tag icon. 8. In the dialog box, select ID: local-container. 9. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 5

Step Six: Create the Left-Hand Column We'll create three columns for the content. The first column will be for sidebar information. It has a grass green background, 10 pixels of padding around its text, and a 1-pixel white border on its right side. We need to tell it to float left because we will be putting layers side-by-side here rather than one atop the other. 1. Click inside the local-container layer and delete the text there. Leave your cursor inside the layer. 2. In the CSS Styles panel, click on the New CSS Style icon. 3. In the New CSS Rule box, use these setting and click OK: b. Tag: #left 4. In the CSS Rule definition for #left box, use these settings and click OK twice: #9cff00 color Box Width 150 pixels Float Left Padding (Same for all) Top 10 Border (UNCHECK same for all for all 3 columns) Right Style solid Width 1 pixel 5. In the Insert Panel, click on the Insert Div Tag icon. 6. In the dialog box, select ID: left. 7. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 6

Step Seven: Create the Center Column This column will contain the main content. It has a white background, 10 pixels of text padding, and 1-pixel white borders on the top and bottom. It also needs to float left. 1. Click on the Code button on the Document tool bar. 2. Find this bit of code and click just after it: <div id="left">content for id "left" Goes Here</div> 3. Click on the Design button on the Document tool bar. 4. In the CSS Styles panel, click on the New CSS Style icon. 5. In the New CSS Rule box, use these setting and click OK: b. Tag: #center 6. In the CSS Rule definition for #center box, use these settings and click OK twice: color: Box Width 358 pixels Float Left Padding (same for Top 10 all) Border (UNCHECK same for all in all 3 Top Style solid columns) Width 1 pixel Bottom Style solid Width 1 pixel 7. In the Insert Panel, click on the Insert Div Tag icon. 8. In the dialog box, select ID: center. 9. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 7

Step Eight: Create the Right Column This last column will be for secondary navigation. 1. Click on the Code button on the Document tool bar. 2. Find this bit of code and click just after it: <div id="center">content for id "center" Goes Here</div> 3. Click on the Design button on the Document tool bar. 4. In the CSS Styles panel, click on the New CSS Style icon. 5. In the New CSS Rule box, use these setting and click OK: b. Tag: #right 6. In the CSS Rule definition for #right box, use these settings and click OK twice: #22ffd8 color Box Width 150 pixels Float Left Padding (Same for all) Top 10 Border (UNCHECK same for all for all 3 Left Style solid columns) Width 1 pixel 7. In the Insert Panel, click on the Insert Div Tag icon. 8. In the dialog box, select ID: right. 9. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this. 8

Step Nine: Create the Footer Finally, we'll put a nice bottom rectangle to allow for copyright information and other small notations and links. It has the same white text and dark blue background as the navigation bar, 10 pixels of text padding, and 1-pixel white borders on the top and bottom. 1. Click on the Code button on the Document tool bar. 2. Find this bit of code and click just before it: </div> </body> </html> 3. Click on the Design button on the Document tool bar. 4. In the CSS Styles panel, click on the New CSS Style icon. 5. In the New CSS Rule box, use these setting and click OK: a. Selector Type: ID (Applies to only one HTML tag) b. Tag: #footer 6. In the CSS Rule definition for #footer box, use these settings and click OK twice: Type color: #005ac9 Box Width 700 pixels Height 40 pixels Float Left Padding (same for all) Top 10 Border (UNCHECK same for all in all 3 Top Style solid columns) Width 1 pixel Bottom Style solid Width 1 pixel 7. In the Insert Panel, click on the Insert Div Tag icon. 8. In the dialog box, select ID: footer. 9. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 9

Step Ten: Cleaning up the Footer Issue This site design is nice but it has a couple of layout flaws. Sometimes we need to do a dreaded "CSS Hack" to get a CSS site to behave the way we want. Let's look at what's wrong: 1. Click inside the center column and press Enter about ten times. 2. Click inside the left column and press Enter twice. 3. Notice that the green and teal columns do not expand along with the center column. 4. Select the menu command File > Preview in Browser > Firefox. First, we need a horizontal rule to push that footer down, and we need it to be invisible. 1. In the CSS Styles panel, click on the New CSS Rule icon. Use these settings and click OK: a. Tag: clear b. Selector Type: Class 2. In the CSS Rule definition for.clear box, use these settings and click OK: Category Setting Value Block Display Block Box Clear Left Positioning Visibility Hidden 3. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 4. Click on the Code button on the Document tool bar. 5. Find this bit of code and click just after it: <div id="footer">content for id "footer" Goes Here</div> 6. Click on the Design button on the Document tool bar. 7. On the Insert Bar, select HTML from the dropdown menu. 8. Click on the first icon for Horizontal Rule. 9. In the Property Inspector, set the Class to clear. 10. Press enter in the right and left columns so they and the center column are even. 11. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. It should look like this: 10

Step Eleven: Image That does a nice job of pushing that footer down. We can also use a background image in the #header, #navigation and #footer layers. 1. In the CSS Styles panel, select the #header style and click the Edit Style Sheet... icon. 2. Go to the section and click on the Browse button next to Image. 3. Navigate to gradient3.jpg inside your images folder and click OK. 4. Save both files (File > Save All), and with index.html active press F12 to view the page. 5. In the CSS Styles panel, select the #navigation style and click the Edit Style Sheet... icon. 6. Go to the section and click on the Browse button next to Image. 7. Navigate to gradient1.png inside your images folder and click OK. 8. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. 9. In the CSS Styles panel, select the #footer style and click the Edit Style Sheet... icon. 10. Go to the section and click on the Browse button next to Image. 11. Navigate to gradient1.png inside your images folder and click OK. 12. Save both files (File > Save All), and with index.html active press F12 to view the page in a browser. 13. Go back to Dreamweaver and look at all the HTML and CSS code you created in Dreamweaver. a. Bring index.html up front by clicking on its tab. Click on the Code button on the Document tool bar. Find the various DIV tags which tell the layers where to go. HTML is used for STRUCTURE. b. Bring main.css up front by clicking on its tab. Notice how the CSS tells the layers what size to be, what to look like and how to behave. CSS is used for PRESENTATION. 11