• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 3. Designing Web Pages > Creating a component to be used as a navigation...

Creating a component to be used as a navigation bar

A component is an HTML source file that stores text and objects, such as a navigation bar, that you want to add to multiple pages in a site. When a component is added to a page, it's added as a single object and remains linked to its source file. To update a component, you simply update its source file to have GoLive automatically update all pages containing it.

At the top of each page in the Gage Vintage Guitars site, you'll place the company logo and a navigation bar for the site. Instead of creating this page content multiple times, you'll create it once and save it as a component that you can quickly add to each page. Now you'll create a new page that you'll store as a component. You store components in the Components folder, located in the site's data folder.

1.
To display the right pane of the site window, click the double-headed arrow () in the lower right corner of the window.

The right pane of the site window appears with the Extras tab selected. The Extras tab displays the contents of the site's data folder, which includes the Components folder.

2.
Place the site window at the bottom of your work area, so that the window is visible when you create a new page. To move a window, drag its title bar.

3.
Choose Window > Objects, or click the tab if the Objects palette is collapsed.

For more information on working with palettes, see “Creating a custom workspace” on page 80. For detailed information on using the Objects palette, see “Using the Objects palette” on page 85.

4.
In the Objects palette, click the Site button ()to display the Site set of icons in the palette. (You can also choose Site from the Objects palette menu.)

5.
Drag the Generic Page icon from the Site set in the Objects palette and drop it on the Components folder in the Extras tab of the site window.

Adding new page to site's Components folder

A new page, untitled.html, is added to the Components folder and appears in the Extras tab of the site window.

6.
Enter navbar.html to rename the file.

Note

To add a new page to a site, you can also choose File > New Page. If you use this method, make sure that you save the page to the appropriate folder on your hard drive.

Now you'll open the navbar.html file.

7.
Double-click the navbar.html file to open it.

The navbar.html file opens in the Layout Editor of the document window.

Note that the default window size for new pages is 619. You'll use this default size in this lesson.

Now you'll change the title of the page. Page titles, together with keywords, are used by Internet search engines and browsers to identify content in your pages.

8.
Select the default page title (Welcome to Adobe GoLive 6) next to the Page icon () in the upper left corner of the document window.

9.
Enter Navigation Bar as the new title.

10.
Choose File > Save.

Changing page title

You can check that a file is saved as a component by opening the Site Extras set () of the Objects palette, and choosing Components from the pop-up menu at the bottom of the palette. Your navbar.html file should now be saved in the Site Extras set, ready to be added to any page.



Now you'll begin designing the component by adding a layout grid to the page.

Adding a layout grid

GoLive layout grids make it easy for you to create table-based designs in your pages. Instead of setting up multiple table cells, you can add a single layout grid to a page and position objects anywhere on the grid with 1-pixel accuracy. You can easily add text to a grid by dragging a layout text box onto the grid and entering text into the layout text box.

1.
Click the navbar.html window to make it active.

2.
Drag the Layout Grid icon from the Basic set () in the Objects palette to the page. (You can also double-click the Layout Grid icon to place a layout grid at the insertion point on the page.)

A layout grid is added to the page. Now you'll specify a width for the layout grid.

3.
Choose Window > Inspector to open the Inspector, or click the tab if the Inspector is collapsed.

4.
In the Layout Grid Inspector, enter 600 for Width. Press Enter or Return.

To resize a layout grid, you can also select it and drag one of its handles.

Now that you've added a layout grid to the page, you can add objects, such as images, to it.

Adding an image using the Point and Shoot button

Traditionally when you create an image for use on the Web, you work in a program such as Illustrator or Photoshop, and then save the image in a Web-safe format such as GIF or JPEG. It's also a good idea to maintain the source file in its original format and resolution, in case you need to make changes to the image in the future. In GoLive, you can add Web-formatted images to the page using a variety of methods.

You can also add images to a page using GoLive Smart Objects, which can save you both time and effort. Using Smart Objects, you can drag an image's source file (such as an .ai or a .psd file) to a page and optimize the image for the Web directly in GoLive. GoLive creates a Web-formatted version of the image in a target file that it adds to the page. When you update the source file, GoLive automatically regenerates the target file to update the image on the page (see Lesson 6, “Using Smart Objects”).



Now you'll add four Web-formatted images to the page using different methods. First you'll add a company logo using the Point and Shoot button in the Image Inspector.

1.
Drag the Image icon from the Basic set () in the Objects palette to the upper left corner of the layout grid. Don't worry about the exact placement of the placeholder; you'll precisely position each image later in this lesson.

Adding image placeholder to page

An image placeholder appears on the layout grid, and the Inspector changes to the Image Inspector. If needed, you can adjust the position of the placeholder, as well as any other object on the grid, by dragging it.

2.
In the Basic tab of the Image Inspector, notice that the Source text box shows “Empty Reference!” This indicates that the image placeholder doesn't reference an image file yet.

Now you'll use the Point and Shoot button to link an image file in the site window with the placeholder on the page.

3.
In the Files tab of the site window, make sure that the images folder is open and the logo.gif file is visible.

4.
Drag from the Point and Shoot button () in the Image Inspector to logo.gif in the images folder within the site window.

Using Point and Shoot button to specify image

The company logo is added to the page, and the path to the logo.gif file appears in the Source text box in the Image Inspector.

GoLive supports the use of low-resolution images that appear in the browser while high-resolution images are loading. You can generate low-resolution images quickly using GoLive, which you'll do now.

5.
In the More tab of the Image Inspector, click Generate. The image must be selected in the document window for this tab to be available.

A low-resolution (low-source) image file named logols.gif appears in the images folder in the site window in addition to the logo.gif file, and the Low option in the Image Inspector is automatically selected.

Now you'll add alternative text for the image. In browsers that don't support images or have image loading turned off, the text is displayed instead of the image. This text may also be used by text reading machines for the visually impaired.

6.
In the Basic tab of the Image Inspector, enter Gage Vintage Guitars Logo in the Alt Text box.

7.
Choose File > Save to save navbar.html.

Adding an image using a keyboard shortcut

Now you'll add a second image to the page using a keyboard shortcut. This image is part of the navigation bar for the site.

1.
Drag the Image icon from the Basic set () in the Objects palette to the right of the company logo on the page.

2.
Hold down Alt (Windows) or Command (Mac OS), and drag from the image placeholder on the page to items.gif in the images folder within the site window.

Using keyboard shortcut to specify image

3.
In the Basic tab of the Image Inspector, enter Items In Stock in the Alt Text box to add alternative text for the image you just added.

Because items.gif is small in file size (1K), you don't need to create a low-source (low-resolution) image.

Adding images by dragging

Now you'll add a third and then a fourth image to the page by dragging. These images also are part of the navigation bar for the site. You don't need to worry about aligning these images perfectly; you'll do that in a later section of the lesson.

1.
Drag the Image icon from the Basic set () in the Objects palette to the right of the Items In Stock image on the page.

2.
Drag repairs.gif from the images folder in the site window to the image placeholder on the page.

3.
Click the newly added image in the document window to select it.

Dragging image file from site window to placeholder

4.
In the Basic tab of the Image Inspector, enter Repairs in the Alt text box.

Now you'll add the fourth image to the page.

5.
Drag the Image icon from the Basic set in the Objects palette to the right of the Repairs image on the page.

6.
Drag appraisals.gif from the images folder in the site window to the image placeholder on the page.

7.
Click the newly added image to select it.

8.
In the Basic tab of the Image Inspector, enter Appraisals in the Alt text box.

9.
Choose File > Save to save navbar.html.

To add an image to a page, you can also drag the image file from the site window to the page, without using an image placeholder. Using a placeholder, however, gives you more control over the placement of the image.



Creating Web pages using Photoshop-based designs

The majority of Web design firms and professionals create their Web page layouts in Adobe Photoshop, including rollovers and animated GIFs, and then bring the designs into their Web pages. When you design a page layout in Photoshop, you can slice it into a table of individual images and GoLive will automatically put the slices into a custom HTML table in your page. When you save the Photoshop image for the Web, you can reformat the HTML and JavaScript code so that any rollovers are fully editable in GoLive. You can use any of these methods to add your Photoshop designs to your Web pages in GoLive:

  • Dragging a Photoshop image file from the site window into the page automatically creates a Smart Object link between Photoshop and GoLive. If the image is sliced, GoLive places the slices into a new table and saves each slice as a separate Web image. You can continue to update the design in Photoshop and GoLive automatically optimizes the sliced images for the Web. (See “Working with a sliced Photoshop image” in the Adobe GoLive 6.0 online Help.)

  • If you want to preserve multiple layers of a Photoshop design, you can import the layers of the image as individual Web images in floating boxes (DHTML layers). Because the Web images are displayed in floating boxes, you can completely reposition them, overlap them, and apply other actions to them such as the Show Hide action. (See “Hiding and showing floating boxes” and “Working with Photoshop layered files” in the Adobe GoLive 6.0 online Help.)

  • You can use your Photoshop-based design as a tracing image and save individual cutouts as Web images in floating boxes. If you want, you can create a duplicate page that places the tracings in a table-based design by converting the floating boxes to a layout grid. (See “Converting floating boxes into layout grids” and “Building a Web page using tracing images” in the Adobe GoLive 6.0 online Help.)


Aligning and distributing multiple objects

Now that you've added all of the images, you're ready to align and distribute them. You'll align the tops of the three images for the navigation bar using the Align palette.

1.
To display the Align palette, choose Window > Align.

The toolbar lets you align objects relative to a layout grid, while the Align palette lets you align and distribute objects relative to each other or their parent.



2.
Click the Items In Stock image to select it. Then Shift-click the Repairs image and the Appraisals image to add them to the selection.

3.
In the Align palette, click the Vertical Align Top button () under Align Objects. (If the tops of the selected objects are already aligned, this button is dimmed.)

The tops of the selected images are aligned.

4.
With the three images still selected, click the Vertical Align Top button () under Align to Parent.

The three images are aligned with the top of the layout grid.

5.
Choose Window > Align to close the Align palette.

Now you'll move the three images together using a keyboard shortcut.

6.
Click away from the three images to deselect them, and select only the Items In Stock image on the page. Then hold down Ctrl+Alt (Windows) or Option (Mac OS), and press the Left Arrow key until the image moves no further.

7.
Select only the Repairs image on the page, and use the same method to move it to the left until it moves no further. Then select only the Appraisals image, and move it to the left until it moves no further.

The selected objects are moved horizontally on the page so that their edges touch each other.

Note

By default, a layout grid has options set to snap objects to the grid. To move a selected object 16 pixels (the default spacing between the horizontal and vertical lines of the grid), press an arrow key. To move a selected object 1 pixel, hold down Ctrl+Alt (Windows) or Option (Mac OS), and press an arrow key.

When you have finished placing objects on a grid, it's a good idea to optimize the grid, which you'll do now. Optimizing a grid reduces its size, so that it takes up less space on the page.

8.
Click the layout grid to select it. Then click Optimize in the Layout Grid Inspector.

Optimized layout grid

For the purposes of this lesson, you won't add navigation links to the images. You'll add these links later in Lesson 5, “Creating Navigational Links.”

9.
Choose File > Save to save navbar.html. Then choose File > Close to close it.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint