IT tutorials
 
Graphics
 

Dreamweaver CS5.5 : The Dreamweaver Test Drive (part 5)

10/1/2011 4:10:50 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

6. Phase 6: Finishing the Page

You’ve covered most of the steps you need to finish this web page. Now you just need to add a graphic, format the copyright notice, and provide a little more structure to the appearance of the page.

  1. In the “Address” headline, click just before the “A.”

    This step places the cursor at the beginning of the headline. You’ll insert a graphic here.

  2. From the Common category on the Insert panel, click the Image button.

    You can also choose Insert→Image or use the keyboard shortcut Ctrl+Alt+I (⌘-Alt-I).

  3. Browse to the “images” folder in the Chapter01 folder, and double-click the graphics file portland.jpg.

    Again, the Image Tag Accessibility window appears. You need to provide a good description for this image.

  4. Type “Portland skyline,” and then press OK.

    Look at the Property inspector. It displays properties specific to this image.

  5. In the Property inspector’s lower-right corner, from the Align pop-up menu, choose Right.

    The image moves to the right edge of the page and text wraps around its left side. (If you chose the Left option, Dreamweaver would move the image to the left and wrap text around the right side.)

    Look for a copyright notice at the bottom of the page. It’s not really related to the content of the page, so you’ll add a line to visually separate it from the rest of the page.


    Note:

    Although the Left and Right options for an image’s Align property are quick ways to force text to wrap around an image, they aren’t valid options for the “strict” versions of HTML or XHTML, or for HTML5. CSS provides a more flexible technique—known as a float—to achieve this effect.


  6. Scroll to the bottom of the page, click before the letter “C” in “Copyright 2009,” and then choose Insert→HTML→Horizontal Rule.

    A gray line appears above the copyright notice. The copyright appears a little big, so you’ll format it next.


    Note:

    You can also add a line above a paragraph of text using the CSS border property.


  7. Select all the text in the copyright paragraph.

    You can either triple-click inside the paragraph or drag from the beginning to the end of the paragraph.

  8. Click the CSS button in the Property inspector, and then, from the Size menu, choose 12.

    The New CSS Rule window opens again. This time you want to create a style that applies only to this one paragraph of text—not every paragraph—so you need to use what’s called a class style.

  9. Leave the default setting—“Class (can apply to any HTML element)”—for the Selector Type box, type .copyright in the Selector Name field (Figure 15), and then click OK.

    Class names begin with a period—that’s how browsers identify the CSS style as a class. You can see that the copyright notice text gets smaller.

    Figure 15. The New CSS Rule window lets you create CSS styles. You can choose among many types of styles. In this case, you’re creating a class style named .copyright. Class styles work a lot like styles in word processors—to use them, you select the text you want to format, and then apply the style.

    The legal department of Chia Vet headquarters has decided that every page on the site must link to an official corporate statement. You’ll add a link for that next.

  10. At the bottom of the page, select the text “Read our full legal statement.”

    To create a link, you just need to tell Dreamweaver which page you want to link to. You can do this several ways. Using the Property inspector is the easiest.

  11. In the Property inspector, click the HTML button, and then click the folder icon that appears to the right of the link field.

    The Select File dialog box appears.

  12. Click the Site Root button (at the top of the dialog box in Windows, the bottom of the dialog box on a Mac), and double click the file legal.html.

    The Site Root button jumps you right to the folder containing your site. It’s a convenient way to move quickly to your root folder. Double-clicking the file tells Dreamweaver to insert the HTML needed to create a link.

    If you preview the page in a web browser, it looks all right…well, not really. The text is kind of hard to read against the blue striped background, it’s too wide if you expand your web browser on a large monitor, and the photo is hanging way out on the right-hand side of the browser. To fix these problems, you’ll create a new layout element—a box to contain all the content on the page.

  13. Click anywhere inside the page, and then choose Edit→Select All or press Ctrl+A (⌘-A on a Mac).

    You selected the entire contents of the page. You’ll wrap all the text and images in a <div> tag to create a kind of container for the page contents.

  14. Choose Insert→Layout Objects→Div Tag.

    The Insert Div Tag window opens (see Figure 16). A <div> tag simply provides a way to organize content on a page by grouping HTML—think of it as a box containing other HTML tags. For example, to create a sidebar of navigation links, news headlines, and Google ads, you would wrap them all in a <div> tag. It’s a very important tag for CSS-based layouts.

    Figure 16. The Insert Div Tag window provides an easy way to divide sections of a web page into groups of related HTML—like the elements that make up a banner, for example. You’ll learn about all the different functions of this window on page 353.

    Next, you need to create a style that provides the instructions needed to format this new <div> tag. You’ve already used the Property inspector to create a style, but that works only for text. To format other tags, you need to create a style in another way.

  15. Click the New CSS Rule button at the bottom of the Insert Div Tag window.

    The New CSS Rule window appears (a CSS style is technically called a “rule”). This window lets you specify the type of style you create, the style’s name, and where Dreamweaver should store the style information.

  16. From the top menu, choose ID, and then type #wrapper in the “Choose or enter a name” field. Make sure you have “This document only” selected in the bottom menu. Click OK,

    The “CSS Rule definition” window appears (see Figure 17). (There’s a lot going on in this box, but don’t worry about the details at this point.

    Figure 17. The “CSS Rule definition” window lets you set over 60 CSS properties (divided into eight categories) to control the formatting of everything from text to images to entire web pages.

    This window is the command center for defining the formatting properties, such as text color, font, and size, for a style. CSS has quite a few properties, which Dreamweaver divides into eight categories. First, you’ll add a background color for this <div> element.

  17. From the left-hand list of categories, select Background. Click the color box that appears to the right of “Background-color,” and then select a white swatch.

    This action adds a white background to the box, making sure the text stands out. Next you’ll set a width for the box, and center it in the middle of the browser window.

  18. Click the Box category, and then, in the width box, type 860.

    This step makes the box 860 pixels wide—the same width as the banner. To make sure the text doesn’t butt right up against the edge of the box, you’ll add a little space (called padding) around the inside of this style.

  19. In the Top box under Padding, type 10 (make sure the “Same for all” checkbox is turned on).

    This action adds 10 pixels of space inside the box, essentially pushing the text and the graphics away from the edges of it.

  20. Under the Margin settings, uncheck the “Same for all” box, and then, for both the right and left margin menus, select “auto.”

    Selecting “auto” here is your way of telling a web browser to automatically supply the left and right margins—in this case, as you’ll see in a moment, it has the effect of centering the <div> element in the middle of a browser window.

  21. The “CSS Rule definition” window should now look like Figure 1-33. Click OK to complete the style.

    The Insert Div Tag window reappears, and the name of the style you just created—“wrapper”—appears in a box labeled ID.

  22. In the Insert Div Tag window, click OK.

    This inserts the new <div> tag and at the same time applies the style you just created. Now it’s time to take a look at your handiwork.

  23. Choose File→Save. Press the F12 key (Option-F12) to preview your work in your browser (Figure 18).

    Test the link to make sure it works. Resize your browser and watch how the page content centers itself in the middle of the window.

Figure 18. Your finished tutorial file should look like this.


Congratulations! You just built your first web page in Dreamweaver, complete with graphics, formatted text, and links. If you want to compare your work with the finished product, go to Chapter01_finished in the Tutorials folder and load the file directions.html.

Much of the work of building websites involves the procedures covered in this tutorial—defining a site, adding links, formatting text, placing graphics, creating styles, and inserting divs. T

 
Others
 
- Dreamweaver CS5.5 : The Dreamweaver Test Drive (part 4)
- Dreamweaver CS5.5 : The Dreamweaver Test Drive (part 3) - Adding Images and Text
- Dreamweaver CS5.5 : The Dreamweaver Test Drive (part 2) - Creating and Saving a Web Page
- Dreamweaver CS5.5 : The Dreamweaver Test Drive (part 1) - Getting Dreamweaver in Shape
- Dreamweaver CS5.5 : Creating a Web Page
- Getting Started with Photoshop CS5 : Working with Non-Square Pixels & Inserting Images in a Document
- Getting Started with Photoshop CS5 : Creating a New Document Using Presets
- Adobe InDesign CS5 : Understanding Your Workspace (part 2) - Interface Menus
- Adobe InDesign CS5 : Understanding Your Workspace (part 1) - Exploring the Interface & The Document Window
- What is New in Illustrator CS5 ? (part 1)
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us