Chapter 3. Creating Page Layouts in GoLive

Creating Page Layouts in GoLive

GoLive provides extensive control over the placement and sizing of graphics and text. In this lesson you’ll learn how to use GoLive to create pages that look great.

In this lesson you will discover how to create HTML page layouts using a variety of GoLive methods, including the new GoLive CS2 layout grid, HTML tables, CSS (Cascading Style Sheets) layers, and liquid layouts.

In this lesson, you will learn how to do the following:

  • Use the layout grid as a style sheet object.

  • Use the layout grid as a table object.

  • Use traditional tables for page layout.

  • Use the Table palette.

  • Span rows and columns.

  • Create and save table styles.

  • Import and export table data.

The Layout Editor in the document window provides the work area on which you create layouts for your page. GoLive layout grids, tables, layers, and new CSS liquid layouts provide the containers for holding and positioning text, images, animations, and movies.

Layout grid-based designs

GoLive CSS-based or table-based layout grids enable you to create designs by freely positioning objects anywhere on the page. You can convert a CSS-based layout grid to a table-based layout grid. You can also convert a table-based layout grid to an HTML table.

Table-based designs

All Web browsers can display HTML tables, so they are often used for page layouts. You can position images, text, and other objects on the page by placing them in table cells. You can create custom tables using the Table Object in GoLive, or convert the layout grid to a table-based object.

CSS-based designs

You can take advantage of the new CSS-based layout grid or use the new CSS layout objects that allow you to create liquid layouts. These are layouts that resize to accommodate the viewer’s screen settings. Liquid layouts offer designers and viewers more flexibility than table-based designs. In GoLive, you can instantly create a liquid layout by simply dragging a CSS layout object from the CSS tab of the Objects palette to a page.

What is the difference between CSS and traditional HTML tables?

By creating objects on your page using either tables or CSS, you can accurately control size and placement of your text and objects on a Web page.

Tables, on the other hand, can contain more source code to achieve the same basic layout, and don’t offer as many options. Also, keep in mind that there are issues regarding the use of tables and accessibility. According to the W3C’s (World Wide Web Consortium) CSS Techniques for Web Content Accessibility Guidelines, it is recommended that CSS-based layouts be used instead of HTML tables for page layout.

In this lesson you will learn both CSS and HTML table methods, as some older browsers may not support CSS-based technology.

Getting started

In this lesson, you will create a new blank site and add provided images to the site window. You will then use the new Layout Grid object to create a page layout.

GoLive layout grids make it easy to create CSS-based and table-based designs for your Web pages. Instead of hand coding CSS or setting up table cells, you can add a single layout grid to the page, draw text boxes or layers, or drag objects anywhere on the grid. GoLive adjusts the properties of the layout grid as you add content and reposition it.

Using layout grids, you can position multiple objects on your page with 1-pixel accuracy.

Before starting, open the finished file to see what you will create using the layout grid.

  1. To ensure that the tools and palettes function exactly as described in this lesson, delete or deactivate (by renaming) the Adobe GoLive CS2 preferences file. See “Restoring default preferences” on page 3.

  2. Start Adobe GoLive CS2. Close the Welcome Screen if it appears.

  3. Choose File > Open.

  4. Navigate to the Lesson03 folder, and open the lesson03_site_folder. Select the lesson03.site file and choose Open.

    The site window appears.

  5. Double-click to open the index.html page.

    The index page of this site was created using the Layout Grid object with the Layout Text box. You will create a page similar to this in this lesson. You can leave this page open for reference, or choose File > Close.

  6. Click on the site window and choose File > Close. When the Adobe GoLive CS2 alert window appears, click OK; you do want to close the site “lesson03.”

    Getting started

Creating the site

Now you will create your own Web site by following the steps in this lesson.

  1. Choose File > New to open the New options window.

  2. Choose Site > Create Site and select Blank Site. Click Next.

  3. In the Specifying a Site Name and Location window, type student in the Name text field.

  4. Choose the Browse button beneath the “Save To” text field and locate the Lesson03 folder. Click OK (Windows) or Choose (Mac OS), then click Next.

  5. The “Use a Version Control System?” window appears. Choose “Don’t Use Version Control.” Click Next. Read about Version Cue in Lesson 13, “Using Version Cue and Adobe Bridge with GoLive CS2.”

  6. In the “Publish Server Options” window, choose “Specify Server Later.” Click Finish.

  7. Keep the site window open.

Using the CSS-based layout grid

  1. Double-click on the index.html page to open the blank document.

  2. Start this page by assigning a proper title. Select the text, Untitled Page to the right of Title: in the top portion of your document window. Replace the text with VirtechU Student Information. Press Enter.

    Using the CSS-based layout grid
  3. If the Objects palette is not visible, choose Window > Objects, or use the keyboard shortcut Ctrl+2 (Windows) or Command+2 (Mac OS). Click on the Palette options button in the lower right to verify that the Basic objects are visible.

    Using the CSS-based layout grid
  4. Select the Layout Grid object (Using the CSS-based layout grid) and drag and drop it to the open index page. The Layout Grid object falls into place in the upper left-hand corner.

  5. If the Layout Grid Inspector is not visible, choose Window > Inspector or use the keyboard shortcut Ctrl+1 (Windows) or Command+1 (Mac OS).

  6. Type 675 in the Width text field and 400 in the Height text field. Press Enter. If necessary, expand the document window to show the entire layout grid.

    Using the CSS-based layout grid

Adding images to the layout grid

Now you will import images to your GoLive site and place them on the layout grid.

  1. Click on the Select window button (Adding images to the layout grid) in the Main toolbar to bring the student.site window forward.

  2. Make sure the Files tab is forward. Choose File > Import > Files to Site. Browse to locate the Lesson03 folder. Open the folder named lesson03_images. Select the first listed image in the window and Shift+click the last item to select all the images in this folder. You can also use Ctrl+A (Windows) or Command+A (Mac OS). Click Open (Windows) or Choose (Mac OS).

    The eight images are added to your site window.

    Adding images to the layout grid
  3. Position the student.site window so that you can see part of the index.html page. Select image_1 and Shift+click on image_2 and image_3 in the Files. Click and drag the three image files directly to the layout grid on the page. Exact positioning at this point is unnecessary.

    Note

    If the images overlap, they may appear red. The red error alert will disappear after the images are repositioned.

    Note
  4. Click on the Select window button in the Main toolbar to bring the index.html page forward.

  5. Using the Object Selection tool (Note), click and drag to separate the three images. Also, drag the images down, as you will be aligning them above their current location. Arrange the images so that image_1 (student on laptop) is the leftmost image, image_2 (female student) is the center, and image_3 (group of students) is the rightmost image. Again, exact positioning is not important at this point.

    Note

    Note

    If you do not know which image each object is referencing, select the image and read the Source text field in the Basic tab of the Image Inspector. The Inspector should be left open at all times; if you do not see it, choose Window > Inspector.

    You will now use the rulers and grid to guide the placement of your images.

Aligning objects on the layout grid

Using the layout grid, you can precisely position objects on the grid as well as take advantage of align and distribute features.

  1. Choose View > Show Rulers, or use the keyboard shortcut Ctrl+R (Windows) or Command+R (Mac OS) to show rulers on the left and top side of your document window.

  2. Using the Standard Editing tool (Aligning objects on the layout grid), click and drag any one of the three images; note the light guide lines that appear in the ruler. Also, notice that as you drag, the object snaps to the grid lines in the layout grid.

    Note

    Image objects on a layout grid cannot overlap, so there may be some restrictions as you click and drag.

    Note
  3. Still using the Standard Editing tool, click on the layout grid. The Inspector changes to a Layout Grid Inspector. Under the Grid section, change the Horizontal Grid to 5. The grid lines running horizontally are now closer together. You can also control the visibility and snap of the grids in the Inspector. For this example you will leave them checked.

  4. Using the Standard Editing tool, select image_1 (student on laptop). Click and drag the image to the top of the layout grid. Using the Horizontal ruler, click and drag the image object until you see the white guide space start at approximately the 200 pixel mark.

    Note
  5. Now select image_3 (group of students) and position it at the top of the layout grid and at approximately the 525 pixel mark on the horizontal ruler.

  6. You will use image_1 and image_3 to set the boundary of all three images when you use GoLive’s distribute feature. Image_2 can be positioned below, but should be between image_1 and image_3.

    Note
  7. Still using the Standard Editing tool, Shift+click on any unselected images; all three images should be selected.

  8. Select Window > Align. The Align palette appears. This palette can be used to align and distribute selected objects on the layout grid.

  9. In the Distribute Objects section of the Align palette, choose Horiz. align centers (Windows) or Horiz. distribute center (Mac OS). Then choose Align tops (Note) from the Align Objects section. If one or both of these choices are grayed out, the items are already aligned and/or distributed evenly.

    Note
  10. Click the Close button on the Align palette.

  11. Choose File > Save.

Using the target insertion point

GoLive provides a target insertion point to make it easier to place objects precisely on a layout grid. You will use this feature to place the VirtechU logo on the page.

  1. Using the Object Selection tool (Using the target insertion point), click on the layout grid one grid line from the top left and two grid lines in from the left. A blinking target insertion point appears.

  2. In the Basic section of the Objects palette, double-click on the Image object (Using the target insertion point). It is placed precisely where the blinking target insertion point appeared.

    Using the target insertion point
  3. With the Image Object still selected, choose the Browse button (Using the target insertion point) to the right of the Source text field in the Inspector palette. Navigate to the student folder created in your Lesson03 folder when the student.site was created. Open the student folder and the web-content folder. Select the image named virtechu_logo.gif and click Open.

    The VirtechU logo is placed in the page.

    Using the target insertion point
  4. Choose File > Save; leave the file open for the next part of this lesson.

Using the layout text box

Next you will place text on the layout grid using the Layout Text Box object.

  1. Select the Layout Text Box object (Using the layout text box) in the Basic section of the Objects palette.

    Note

    Using the layout text box If you need to pull the Objects palette forward, use the toggle keyboard shortcut, Ctrl+2 (Windows) or Command+2 (Mac OS). This hides or shows the Objects palette.

  2. Click and drag the Layout Text Box object to the area beneath the VirtechU logo.

  3. Using the Set position text fields in the Main toolbar, enter the value of 25 in the Horizontal Position text field and 80 in the Vertical Position text field. Press Enter.

  4. Using the Standard Editing tool (Using the layout text box), use the handles to click and drag the right middle handle to expand the text box to 150 px wide. Then use the bottom middle handle to expand the height of the box to 192 px high. Use the pixel values displayed in the text box for more accuracy. You can also use the Set width/height text fields in the Main toolbar.

    Using the layout text box
  5. The text that is to go into this layout text box is saved as a .txt file. Choose File > Open and navigate to the Lesson03 folder. Select the file named student.txt and choose Open.

  6. Click and drag to select the text above the dotted line. Choose Edit > Copy.

  7. Click and hold down on the arrow to the right of the Select window button on the Main toolbar, and select index.html.

    Using the layout text box

    Note

    When you click and hold down on the Select Window, you can choose to bring any open document forward.

  8. Using the Standard Editing tool (Note), click in the text box. A blinking text insertion point appears. Choose Edit > Paste. The text is now in the text box.

    You will now create a larger text area in the center of the page.

    Note
  9. Click and drag another Layout Text Box object onto the page, anywhere under the image_1 (student on laptop).

  10. Using the top middle handle, expand the new text box to start one grid line under the images. Then use the handles to expand the text box to start at the same grid line as image_1 and end on the right side of image_2. Notice the guide lines that appear as you drag the handles to help you resize and position the text box more accurately. Using the handles, make the width and height approximately 310 pixels wide × 128 pixels high.

    Note
  11. Click and hold down on the arrow to the right of the Select window button (Note) on the Main toolbar and select student.txt. The text file is brought forward.

  12. Select the text underneath the dashed line and choose Edit > Copy, then choose Window > index.html to return to the index.html page. Using the bottom of the Window menu is another method for selecting which document is forward.

  13. Using the Standard Editing tool, click in the large text box to insert the cursor. Then choose Edit > Paste.

  14. Return to the student.txt file and choose File > Close.

Assigning font sets and color

In this section you will use traditional HTML coding to assign a font set and color to your text in the text boxes. Text attributes can also be changed using Cascading Style Sheets. Read more about Cascading Style Sheets in Lesson 5, “Adding and Formatting Text.”

  1. Using the Standard Editing tool (Assigning font sets and color), click in the text box on the left side of your page. Choose Edit > Select All, or use the keyboard shortcut Ctrl+A (Windows) or Command+A (Mac OS) to select all the text.

  2. Choose Type > Font > Helvetica Set. The text is changed to a sans serif typeface.

    Assigning font sets and color

    Now you will change the text in the text box in the center of the page.

  3. Still using the Standard Editing tool, click inside the text box in the center of the page.

  4. Choose Edit > Select All.

  5. Choose Type > Font > Helvetica Set.

  6. Assign a smaller text size by choosing 2 from the Set font size drop-down menu on the Main toolbar. Read more about text formatting in Lesson 5, “Adding and Formatting Text.”

    Assigning font sets and color
  7. With the text still selected, change the text color by double-clicking on the Set text color box (Assigning font sets and color) in the Main toolbar. When the Color Picker window appears, type the hexadecimal value of 555555 (dark gray) in the hexadecimal color text field, then press the Tab key. Click OK.

    Assigning font sets and color
  8. Choose File > Save. Leave the page open.

Changing the background of a layout grid

In this part of the lesson you will add a background image to the layout grid.

  1. Using the Standard Editing tool (Changing the background of a layout grid), click on a blank area of the layout grid.

  2. If the Layout Grid Inspector is not visible, choose Window > Inspector. Check the box to the left of Image in the Background section of the Layout Grid Inspector.

  3. Using the Browse button (Changing the background of a layout grid) to the right of the Image text field in the Inspector, locate the image named building.jpg in the web-content folder of your site.

    Changing the background of a layout grid

Changing the background color of layout text boxes

Now you will change the background color of the individual Layout Text Box objects.

  1. If the Objects palette is not forward, choose Window > Objects. The Basics section should still be visible.

  2. Select the Layout Text box object and drag it from the Objects palette to the right side of the large text box, underneath image_3.

    Changing the background color of layout text boxes

    You can reposition the Layout Text box object manually by crossing the edge of the text box; when a hand appears (Changing the background color of layout text boxes), click and drag.

    In this example, you will use the positioning tools on the Main toolbar.

  3. Using the Set Position text fields in the Main toolbar, enter the value of 530 in the Horizontal Position text field and 144 in the Vertical Position field. GoLive will not allow you to input numbers that cause overlap of elements on the grid. If you cannot use the numbers in bold, use the closest value possible.

  4. Using the Set width/height text fields in the toolbar, enter 144 in the Width text field and 80 in the Height text field. Press the Return or Enter key.

    Changing the background color of layout text boxes
  5. With the Layout Text Box still selected, double-click the box to the right of Color in the Inspector. The Color Picker window opens.

    Note

    If the first click brings your Color palette forward and blocks the Color Picker from appearing, drag the Inspector to a location clear of any other palettes.

  6. Enter the hexadecimal value of cccc99 in the hexadecimal text field, to the right of the # sign. Press Tab, then click OK.

  7. Choose File > Save. Keep the file open.

Adding an image to a layout text box

Next you will change the default alignment of the layout text box and add an image and text.

  1. Using the Standard Editing tool (Adding an image to a layout text box), click to insert the cursor in the new colored text box. Click on the Align Center button (Adding an image to a layout text box) in the Main toolbar.

  2. With the cursor still in the layout text box, double-click on the Image Object in the Basic section of the Objects palette. An Image object appears where the cursor was located.

    You will use the Fetch URL button (Adding an image to a layout text box), sometimes referred to as the pick whip, to link to an image. The Fetch URL button is located to the left of the Source text field in the Image Inspector.

  3. Click and hold on the Fetch URL button. Do not release, but drag the directional line up to the Select window button (Adding an image to a layout text box) in the Main toolbar or directly to the site window. The site window comes forward. Do not release—drag the directional line over to the Files tab and release when the image contact.gif is highlighted. The image is placed inside the Layout Text Box.

    Adding an image to a layout text box
  4. Using the Standard Editing tool, click to the right of the image you just placed, staying inside the same layout text box. A blinking cursor appears. Press the Return key to create a new line. Type 800 555-1212.

    As a final step you will optimize the layout grid. Optimizing a grid automatically reduces the size of the grid to its minimum size, fitting around the outer borders of all the objects.

  5. Using the Object Selection tool (Adding an image to a layout text box), click on a blank area of the layout grid, then press the Optimize button on the Layout Grid Inspector.

    Adding an image to a layout text box

    Note

    Adding an image to a layout text box You can Shift+click the Optimize button to reduce the width only and Alt+click (Windows) or Option+click (Mac OS) the Optimize button to reduce the height only.

  6. Choose File > Save. Leave the index page and student.site open for the rest of this lesson.

    You are finished with the layout of this page; now you will learn how to take advantage of GoLive’s table features.

Converting a layout grid to a table

Up until this section, you have used the default CSS-based layout grid. In this section you will convert your CSS layout grid to a table-based layout grid.

  1. With the index.html file open, choose File > Save As. Type table_grid for the file name.

  2. Click on the Site Folder button (Converting a layout grid to a table) at the bottom of the Save As window and choose Root (Windows) or Root folder (Mac OS) from the drop-down menu. This directs you to the web-content folder of the student.site. Press Save.

    Now you will convert this page version to a table-based layout grid.

  3. Using the Standard Editing tool (Converting a layout grid to a table), click on a blank area of the layout grid.

  4. Right-click (Windows) or Ctrl+click (Mac OS) to show the contextual menu, choose Convert to Table based Grid.

    You may not initially notice a difference in your file, but if you were to click on the Source tab of the document window you would see that the code creating this page is now table-based. Also, in the Layout view, the icon in the upper right corner of the layout grid changes from a CSS icon (Converting a layout grid to a table) to a table icon (Converting a layout grid to a table). This icon is behind image_3, so you will not see it unless you extend the grid to the right.

    If you have switched to the Source view, choose the Layout tab to return to the working page view.

Converting a layout grid to a traditional HTML table

You will now take this layout grid one step further toward looking more like a traditional HTML table.

  1. Using the Object Selection tool (Converting a layout grid to a traditional HTML table), click on a blank area of your layout grid.

  2. Choose Special > Convert > Layout Grid to Table.

  3. When the Convert window appears, leave at the defaults and click OK.

    The layout grid is now replaced with a traditional table. Rows and columns are automatically created based upon placement of your text and images.

    Converting a layout grid to a traditional HTML table

    Note

    Your results may be different depending upon how objects align on your page. To achieve the best results, align as many objects with each other before converting to a table. If you need to fix your file, choose Edit > Undo, align your objects and try converting again.

  4. Choose File > Save, then File > Close. Keep your student.site window open for the rest of this lesson.

Using HTML tables for page layout

Now you will discover how to use HTML tables. Tables are useful for organizing large amounts of data, and can be used for traditional layouts.

First you will open an existing page to see the final Web page.

  1. Choose File > Open.

  2. Browse to the Lesson03 folder, and select the table_finish.html page. Select Open.

    A page created with an HTML table appears. Notice the page layout was created by a number of cells organized in rows and columns.

    Using HTML tables for page layout
  3. You can leave this page open for reference, or choose File > Close.

  4. Make sure that you still have your student.site window open from earlier in this lesson. If you do not, choose File > Open Recent and select student.site, or choose File > Open > Lesson03 > student.site.

Placing a table on your page

To start the next page, you will open an existing page on which to build your table.

  1. Choose File > Open. Select the file named table_start.html in the Lesson03 folder and click Open.

  2. Choose File > Save As. Type table1 for the file name.

  3. Click on the Site Folder button (Placing a table on your page) at the bottom of the Save As window and choose Root (Windows) or Root folder (Mac OS) from the drop-down menu. This directs you to the web-content folder of the student.site. Press Save.

  4. Make sure the Objects palette is open and the Basic Objects are visible. If the Objects palette is not visible, choose Window > Objects.

  5. Select the Table Object (Placing a table on your page) and drag it to the page. A default table appears on your page and the Inspector is now a Table Inspector. The Table tab of the Inspector should be forward.

  6. In the Table Inspector, change the Rows text field to 4 and the Columns text field to 2.

    Placing a table on your page
  7. In the Table Inspector, select the Width drop-down menu and select Pixel. Enter 600 into the Width text field. In the Height drop-down menu leave the height at Auto. Press Enter.

    Note

    Placing a table on your page Always set the number of rows and columns before setting the table size. Otherwise you will get unexpected results.

Adjusting cell size

As a default, table cells are set to automatically adjust as you add content or text to the individual cells. To fix the size, you will assign a pixel dimension to all the cells at one time. The dimensions can be changed later.

  1. Using the Standard Editing tool (Adjusting cell size), click inside the top left cell. The blinking cursor appears.

  2. Ctrl+Enter (Windows and Mac OS) to select the top left cell, not the text area inside. The cell becomes highlighted with a dark border.

  3. Select the Cell tab of the Table Inspector and select the Width drop-down menu; change it from Auto to Pixel. Then type in the value of 145.

    Adjusting cell size
  4. Using the Standard Editing tool, click in the top right cell. Choose Special > Table > Select Cell to select the cell.

  5. In the Cell tab of the Table Inspector, change the Width drop-down menu from Auto to Pixel, then type the value 441.

    Adjusting cell size
  6. Choose File > Save.

Spanning rows and columns

At this point your table is in the standard grid pattern of a table. In this section you will find out how to span rows and columns to create larger areas that expand over several rows or columns.

Before you span rows and columns on your page, you will open a practice file.

  1. Leave the file table1.html open and choose File > Open. Open the file named table_practice in the Lesson03 folder.

    A page with a simple table appears.

    You will now discover how to use the Table & Boxes palette to easily select cells.

  2. Insert your cursor into any cell, then choose Window > Table & Boxes. The Table & Boxes palette appears. Make sure you are on the Select tab.

    The Select Tab of the Tables & Boxes palette provides you with a frame, or outline, of the table. You can use this outline to select cells, rows, and columns. You can also use the Select parent table button (Spanning rows and columns) in the lower left to zoom into and out of tables within tables. This button is grayed out since there are no tables placed inside of this table.

    Spanning rows and columns

    Note

    The Select tab of the Table & Boxes palette lets you review the size and units of every row and column within a table, as well as those of the entire table. This tab also lets you identify and quickly fix conflicts in your column, row, and table sizes. These conflicts can occur when the dimensions of content within a table exceed the table properties, or when the table properties do not add up properly. To fix a conflict, click on any pixel values shown highlighted in red.

  3. In the Table & Boxes palette, click on the top left cell to select that cell.

    Practice by clicking on other cells. You can Shift+click to select multiple cells using this palette.

    Note

    By positioning the cursor on the outer edge of a row (side) or column (top), you can select an entire row or column. Just click when the cursor changes into an arrow.

    If you selected other cells, select only the upper left cell.

  4. Locate the Table Inspector. Choose the Cell tab and type 2 in the Row Span text field.

    The cell now spans two rows.

  5. With the same cell still selected, type 2 in the Column Span text field, press Return or Enter. The cell is now expanded to the size of four cells.

    Note
  6. Type 1 in both the Row Span and Column Span text fields to bring the cell back to its original size. Press Enter.

    Next you will use keyboard shortcuts to span rows and columns.

  7. Using the Table & Boxes palette, select the upper left cell again.

  8. Hold down the Shift key and press the right arrow key (→). The cell is spanned to two columns.

  9. Now select the right cell in the second row.

  10. Press Shift+Down arrow (↓) to span the row to two rows. Repeat this again to span three rows.

    Note
  11. Now practice undoing the row and column spans by pressing Shift+Left arrow (←), and then Shift+Up arrow (↑). You can also undo spans by changing the Row Span and Column Span text fields in the Cell tab of the Table Inspector.

  12. Choose File > Close and do not save. You will now apply what you practiced on this page to your table_layout.html page.

    Note

    You cannot expand rows upwards or columns from right to left.

Designing a layout using spans

Now apply column and row spans as part of your layout.

  1. Return to the table1.html page and using the Object Selection tool (Designing a layout using spans) select the upper left cell. Press Shift+Right Arrow (→) one time. The column now spans the entire table.

  2. Now select the right cell in the second row and press Shift+Right Down Arrow (↓). Repeat this one more time. The cell is now spanned three rows.

    Designing a layout using spans
  3. Choose File > Save. Leave this file open.

Changing the table attributes

In this section you will add color to some table cells.

  1. If your Table & Boxes palette is not open, choose Window > Table & Boxes.

  2. In the Select tab of the Table & Boxes palette, click to select the first cell in the second row. Then, Shift+click to select the two cells directly underneath.

  3. In the Cell tab of the Table Inspector, click the lower right corner of the Color field and choose the Web Named Colors library from the drop-down menu. Click the corner again, and select the color #A9A9A9 DarkGrey from the swatches displayed above the list of swatch libraries. GoLive displays the swatches from the swatch library you chose.

    Changing the table attributes

    Note

    Changing the table attributes You can also double-click on the Color box to open the Color Picker in GoLive.

  4. In the Table tab of the Table Inspector, eliminate the border on this table by typing 0 in the Border text field, and pressing Return or Enter.

  5. Create some padding by typing 10 the Cell Pad text field. This adds a 10-pixel margin around the interior of all cells.

  6. Eliminate the spacing between the cells by typing 0 in the Cell Space text field. Press Return or Enter.

    Changing the table attributes

Creating and saving table styles

Make it easy to recreate tables by saving table attributes such as: Border, Color, Cell Pad, and Cell Space, Vertical Alignment, Horizontal Alignment, and Color.

  1. If not visible, choose Window > Table & Boxes. If not already selected, click the Table Style tab.

    Creating and saving table styles
  2. Make sure the table is selected by inserting the cursor in any cell. Then, click on the word <table> in the line of source code that appears in the document bar at the bottom of the screen. This is a hierarchical display of your source code, and is yet another way of selecting a table in GoLive.

    Creating and saving table styles
  3. Click on the New table style button (Creating and saving table styles) in the Table Style tab of the Table & Boxes palette. Type in basic table in the New Table Style dialog window and click OK.

    The table attributes are captured and a preview is visible in the Table Styles tab.

    Creating and saving table styles

    Later in this lesson you will apply an existing style to a table.

Importing text into a table

Typing directly into table cells is relatively simple. You type data directly into a cell and then press Tab to position the text cursor in the next cell and so on. A more efficient way to add text is to import a .txt (text) file directly into a table. In this part of the lesson, you will import data into a new table and then apply an existing table style.

  1. Using the Standard Editing tool (Importing text into a table), click in the large cell in the right side of the table. The blinking insertion point appears in the cell. This is the cell that spans three rows.

  2. Double-click on the Table object (Importing text into a table) in the Objects palette. The table is inserted into the cell.

  3. Using the Table Inspector, change the rows value to 3, if it’s not already.

    Note

    When text is imported into a table, rows and columns are automatically added if needed.

  4. Using the Standard Editing tool, click on the upper left cell in the new table.

  5. Click on <td>, furthest to the right, in the source code hierarchy in the document bar at the bottom of the page.

    Note
  6. Choose Special > Table > Import Tab-delimited text. When the Open dialog window appears, browse to locate the Lesson03 folder and choose the text file named tour.txt. Select Open.

    The text is automatically input into appropriate rows and columns. The default setting is that each tab stop is automatically read as a new column, and each paragraph return is read as a new row.

    Note

    You can change this default in the CoL Separator drop-down menu in the Open dialog window as you import the text. Other choices are Comma, Space, and Semicolon.

    Note

    You can also export text from a GoLive table by selecting Special > Export > Tab-Delimited Text.

  7. Position your cursor over the right border of the table. When you see the double arrow icon (Note) click and drag to make the table wider. A specific size is not necessary, just adjust the table to be larger and allow a better fit for the text.

    Note

    Note Hold down the Alt (Windows) or Option (Mac OS) key when adjusting individual rows and columns in a table to get independent control over width and height.

  8. Insert the cursor into the cell containing the text “Tour the Campus,” then choose Special > Table > Select Cell.

  9. Press Shift+Right arrow twice, to span the column. Span the bottom left cell containing the text “Registration is required” using the same method.

    Note
  10. Choose File > Save and leave the file open for the next part of this lesson.

Applying a table style

You will now apply a table style to your new table.

  1. Select the top cell of the table.

  2. If the Table & Boxes palette is not visible, choose Window > Table & Boxes.

  3. From the Style drop-down menu, choose Blue. Then click Apply.

    The Blue table style is applied to the cells of the table.

    Applying a table style

    Note

    While you can apply a Style to an entire table, you can also select portions of a table to apply a style to.

    Note

    Note You can resize the blue bracket so that it marks the desired rows or columns to contain repeating styles. To resize a blue bracket, drag either end of it. The resizable area of the bracket is marked by blue lines at both ends of the bracket.

Placing text and images in the table

Now that you have a table, you will add images to the layout.

  1. Using the Standard Editing tool (Placing text and images in the table), click in the upper left cell of the large table. This is the table created to form the layout of the Web page. The blinking insertion point appears in the cell.

  2. Double-click on the Image Object (Placing text and images in the table) located in the Basic section of the Objects palette. The Image Object appears where the insertion point was located.

  3. If the Inspector palette is not visible, choose Window > Inspector or use the shortcut Ctrl+1 (Windows)/Command+1 (Mac OS). Using the Basic tab of Image Inspector, click on the Browse button (Placing text and images in the table). When the Open dialog window appears, locate the image named virtechu_logo in the web-content folder inside the student folder you created when the site was created. Click Open.

    The Image object is replaced with the VirtechU logo.

  4. Using the Standard Editing tool, click on the VirtechU logo and choose Middle from the Alignment drop-down menu in the Basic tab of the Image Inspector.

  5. Using the Standard Editing tool (Placing text and images in the table), click after the VirtechU logo to insert the type cursor. Press the spacebar once and type The place to learn technical skills.

    Placing text and images in the table

Applying a Cascading Style Sheet to the cell

  1. Select the cell containing the VirtechU logo and headline text.

  2. If you do not see the CSS palette, choose Window > CSS to display the CSS palette. It may be docked below the Inspector. There are two class styles already created in this document. For more information about creating a CSS class style, see Lesson 5, “Adding and Formatting Text.”

    Since you have a cell selected, it gives you only one option: to apply the style to the entire cell. In the source code, a table cell is represented by the tag <td>, which stands for table data.

  3. Check the <td> checkbox to the right of headline. The text in the cell is now changed to represent the attributes assigned to the headline class style. You may have to undock the CSS palette in order to see the checkbox.

    Applying a Cascading Style Sheet to the cell

Completing the table

In this next section you will add the remaining imagery and text to complete this page.

  1. Position the site window so that you can see the list of files at the same time as your page. Then drag image_1.jpg from the site window to the second cell down on the left.

  2. Drag image_2.jpg into third cell down on the left.

  3. Drag image_3.jpg into last cell down on the left.

    Completing the table
  4. Choose File > Open. When the Open dialog window appears, browse to locate and select the file named student.txt in the Lesson03 folder. Click Open.

  5. Select all the text under the dashed line on the text document and choose Edit > Copy. Choose File > Close to close the document.

  6. Return to the table1.html file. Using the Standard Editing tool (Completing the table), click to the right of your “Tour the Campus” table, a large cursor appears. Press Return.

  7. Choose Edit > Paste. The copy appears under the table.

  8. With the cursor still blinking, press Ctrl+Enter (Windows and Mac OS). This selects the table cell.

  9. If the CSS palette is not already open, choose Window > CSS, and the CSS palette appears.

  10. Check the <td> checkbox to the right of the class style named “gray_text.” The text changes to the style attributes assigned to the gray_text class style.

    Completing the table
  11. With the cell still selected, choose the Cell tab of the Table Inspector. Choose Top from the Vertical Alignment drop-down menu.

    Note

    Completing the table You can also assign class styles to a table cell using your contextual menu. With the table cell selected, right-click (Windows) or Ctrl+click (Mac OS).

    You have completed the section of the lesson that pertains to layouts using tables. Read on to see how you can use Cascading Style Sheets for layout.

  12. Choose File > Save, and then File > Close.

Using layers

You can use layers to divide your page into rectangles that can be formatted and positioned individually, much as you can with a traditional page layout application like Adobe InDesign. Layers can contain any HTML element that a page can contain, such as an image or simple HTML text with formatting. You use the Layer tool and the Layers palette to add and manage multiple layers on the page.

Note

Viewers may not be able to see CSS layout objects if their browser doesn’t support CSS, the browser’s CSS support has been turned off, or the browser is set to override page styles with a CSS file supplied by the viewer. Web browser support for CSS varies greatly between browser vendors and browser versions.

Adding layers to an HTML page

For this document you will create a layout similar to the table lesson, but use layers.

Make sure that the student.site window is still open. If it is not, choose File > Open Recent Items and locate the student.site file, or choose File > Open and browse to locate the saved student.site file in Lesson03 > student folder.

  1. Choose File > Open. Browse to locate the file named layout_finish.html in the Lesson03 folder. Press Open. The finished layer file appears.

    This is the page you will create using layers. You will learn how to create, name, and arrange stacking order of the layers along with other layer features.

    Adding layers to an HTML page
  2. Choose to leave this file open as a reference, or choose File > Close.

  3. Choose File > Open and browse to locate the file named layout_start.html in the Lesson03 folder. The start page appears.

  4. Choose File > Save As. Keep the name the same and click on the Site Folder (Adding layers to an HTML page) and select Root (Windows) or Root folder (Mac Os). Click Save.

  5. Begin this page by selecting the Layer object (Adding layers to an HTML page) from the Basic section of the Objects palette.

  6. Click and drag the Layer object to the layer_start.html page.

    A layer appears in the upper left of the page.

  7. If the Inspector is not visible, choose Window > Inspector. While the layer is selected, the Inspector is a Layer Inspector.

    Note

    Adding layers to an HTML page If you need to reselect the layer, cross the cursor over any side of the layer; when the hand icon (Adding layers to an HTML page) appears, click.

  8. Change the name from layer1 to logo in the Name text field; press Return. This will help you identify the layer later.

    Adding layers to an HTML page
  9. Drag the right center handle to the right to make the layer approximately 600 pixels wide. As you drag, observe the value in the Width text field in the Main toolbar. You can also type the value of 600 into the Width text field. Type 62 in the Height text field.

    Use the Main toolbar for accurate layer coordinates and size controls.

    Adding layers to an HTML page

Inserting objects into the layer

Now you will insert an image and text into the layer.

  1. Using the Standard Editing tool (Inserting objects into the layer), click to insert the blinking cursor inside the layer.

  2. Double-click on the Image Object in the Basic section of the Objects palette. The image Object appears in the layer.

  3. Using the Image inspector, click on the Browse button (Inserting objects into the layer) to the right of (EmptyReference!) When the Open dialog window appears, navigate to locate the image file named virtechu_logo.gif in the web-content folder of the student folder inside of Lesson03. Choose Open. The logo appears inside the layer.

  4. Using the Standard Editing tool, click once on the VirtechU logo image. Use the Alignment drop-down menu in the Basic tab of the Image Inspector to change the alignment to Middle. Alignment determines the position of the text that follows the image.

  5. Click to the right of the logo; a large blinking cursor appears. Press the spacebar once and type The place to learn technical skills.

  6. Position the cursor over the edge of the layer. When the hand icon (Inserting objects into the layer) appears, click to select the layer.

    Just as with table cells, you can apply a class style to the contents of a layer.

  7. Choose Type > CSS Style for <div> select headline. The text is changed to red.

    Note

    Inserting objects into the layer You can use the Select tab of the Table & Boxes palette to navigate in CSS layout objects. Click the Select Parent Table tool (Inserting objects into the layer) to select the parent CSS layout object, or click in a row or column of a CSS layout object in the tab to place an insertion point.

    Inserting objects into the layer

Aligning and distributing layers

In this next section, you will add the imagery in three separate layers which you will then align and distribute.

  1. Click and drag a Layer object from the Basic section of the Objects palette to your HTML page. Make sure that you do not drag the new layer into the existing layer.

    Note

    You can tell if you have dragged one layer into another by referencing the yellow layer marker (Note). If the marker is not loose in the upper left corner, it is probably nested inside an existing layer. You can choose to Edit > Undo, or drag the marker out of the layer to an open area of your page.

  2. Reposition the new layer by positioning the cursor over the edge of the layer. When a hand icon (Note) appears, click and drag to move the layer beneath the logo layer. Use the grid that appears to align the left sides of the two layers. Type 100 in the Vertical Position text field of the Main toolbar.

    Note
  3. Select Edit > Duplicate to duplicate this layer and put a copy directly on top of the existing layer.

  4. Choose Edit > Duplicate again. This will provide you with three layers, all positioned on top of one another.

    Note

    Note You can also clone a layer by dragging and holding down the Ctrl (Windows) or Option (Mac OS) key.

  5. Using the Object Selection tool (Note), click on the topmost layer and drag it to the right of the page. Then select the next layer and position it in between the left and right layer. Exact positioning is not important.

    Note

    Note

    Grid rules appear as you drag layers to help you with alignment. You can use these as an aid, or use the Align palette as directed in the next part of this lesson. If you prefer not to see the grid, choose Window > Layout and select Layout Grid Settings from the Layer’s palette menu. Uncheck “Visible when Dragging,” click OK.

  6. Using the Object Selection tool, select the left layer and type laptop in the Name text field of the Layer Inspector.

  7. Select the center layer. Type female into the Name text field in the Layer inspector.

  8. Select the right layer. Type group into the Name text field.

  9. Using the Object Selection tool, select the first layer, now named laptop. Hold down the Shift key and click on the layer named female and the last layer named group.

    All three layers are selected.

    Note

    Note You can also select multiple layers by selecting the Object Selection tool and dragging a marquee around the layers you wish to select.

  10. Choose Window > Align. The Align palette becomes visible. Select Horiz. align centers (Windows) or Horiz. distribute center (Mac OS) from the Distribute Objects section of the Align palette. Then select the Align Tops button under Align Objects.

    Note

    Note

    If any of the options are grayed out, the item is already aligned, or distributed evenly.

  11. Choose File > Save. Leave the file open for the next part of this lesson.

Adding imagery and text

  1. Position the student.site window so that you can see it at the same time as the layout_start.html file.

  2. Click on image_1.jpg and drag it into the leftmost layer.

  3. Drag image_2 into the middle layer.

  4. Drag image_3 into the rightmost layer.

    Adding imagery and text

    You will now add another layer that will be used for text.

  5. Make sure that the Basic section of the Objects palette is visible. Select the Layer object (Adding imagery and text) and drag it to an empty spot on your layout_start.html page, making sure that you do not drag the new layer into an existing layer. It is positioned in the upper left of the page.

  6. After placing the Layer object, cross your cursor over the side and click when you see the hand icon (Adding imagery and text). This selects the layer. Use the position and size text fields in the Main toolbar for an accurate-sized layer. Enter 18 for the Horizontal Position and 240 for the Vertical Position. Enter 475 in the Width text field and 150 in the Height. Press Enter.

    Adding imagery and text
  7. With the layer still active, type text into the Name text field in the Layer tab of the Layer Inspector. Press Enter.

  8. Choose File > Open. When the Open dialog window appears, browse to locate the file named student.txt in the Lesson03 folder, and choose Open.

  9. Select the paragraph text located under the dashed line and choose Edit > Copy. Then choose File > Close.

  10. Return to the layer_start.html file, and using the Standard Editing tool (Adding imagery and text), click inside the new text layer you created. Then choose Edit > Paste.

  11. Choose Type > CSS DIV select gray_text. The text is changed to gray.

    Adding imagery and text
  12. Choose File > Save. Leave the file open.

Organizing layers

In this next section you will create a new layer with a colored background. Since layers’ default stacking order is such that this layer will cover the existing layers, you will learn how to change the stacking order.

  1. Select the Layer object (Organizing layers) from the Basic section of the Objects palette and drag it to an empty spot on your layout_start.html page, making sure that you do not drag the new layer into an existing layer. The new layer is positioned in the upper left of the page.

  2. After placing the layer object, select it and use the position and size text fields in the Main toolbar. Enter -5 for the Horizontal Position and -5 for the Vertical Position. Enter 675 in the Width text field and 150 in the Height. Press Enter.

  3. With the layer still active, type background into the Name text field in the Layer tab of the Layer Inspector. Press Enter.

  4. Click on the Background tab of the Layer Inspector and double-click on the color box. Enter 9F9F9F into the hexadecimal text field. Press the Tab key and then press OK.

    Organizing layers

    Note

    For the Color Picker to appear, you may have to position the Inspector away from your other palettes.

    The background of the new layer is now gray.

    Note

    The newly created layer is covering the existing layers. To change this, you need to understand the concept of layer arrangement using Z-index.

Changing the Z-index

  1. Choose Window > Layers to make the Layers palette visible.

  2. In the Layers palette, select the background layer.

  3. With the background layer selected, type 0 in the Z-index text field located in the Layer tab of the Layer Inspector. Press Enter.

    Changing the Z-index

    Changing just this layer will not affect where it appears in the stacking order until we also change the other layers’ Z-index values. To make selecting the layers easier, you will use the Layers palette.

Using the Layers palette

You can use the Layers palette (Window > Layers) to quickly select multiple layers for alignment and grouping. You can also use the Layers palette to temporarily lock, hide, or show a layer as you work. (Unlike similar settings in the Layer Inspector, lock, hide, and show settings in the Layers palette do not affect the display of layers in the browser.)

Note

Some settings in the Layers palette are only temporary and will be overridden when you switch document views.

  1. Click on the layer “logo” in the Layers palette. This selects the layer and allows you to make changes in the Layer Inspector. In the Z-index text field, type 5, then press Return or Enter. This brings the logo layer in front of the background layer.

    Options in the Layers palette
  2. Select the layer named laptop and type 5 into the Z-index text field.

  3. Individually select the layers female and group, and type 5 into the Z-index field. Press Return or Enter.

    Options in the Layers palette

    With the layers’ Z-index assigned to higher numbers, they are now forward of the background layer.

    Note

    Options in the Layers palette Experienced programmers use Z-index values that increase by 5. This makes it easier to insert layers where you want them later without having to change all other values.

  4. Choose File > Save and File > Close. Leave the student.site window open for the next part of this lesson.

Liquid layouts

GoLive lets you add a predesigned CSS layout object, based on layers, to a page, and then add text and objects to the layout just as you would in any other page. CSS layout objects are liquid layouts—they adjust to accommodate the viewer’s screen settings. You don’t need to know how to code CSS to create CSS layout objects, but you can customize them by using the CSS Object Inspector and the CSS Editor.

Liquid layouts
  1. Choose File > Open and double-click on the page named liquid.html located in the Lesson03 folder. A page using liquid layouts appears.

  2. Select the Preview tab in GoLive and drag the document window to a larger size, then smaller. Note that the liquid layout feature used to create this page allows the CSS elements to adjust to the size as needed.

  3. You can leave this page open for reference or choose File > Close.

Creating a page using liquid layouts

In this next section you will create a simple page using the liquid layout feature.

  1. Create a new page by selecting File > New. When the New dialog window appears, choose Web > Pages > HTML Page, then click OK.

  2. Choose File > Save As. When the Save As dialog window appears, type the name liquid_virtechu. Click on the Site Folder button (Creating a page using liquid layouts) and select Root Windows) or Root folder (Mac OS), then choose Save.

  3. When the Set Title dialog window appears, type the title liquid layout, then press Set.

  4. Choose the CSS section of the Objects palette and select the Padded Box object (padded); drag and drop it on the page.

  5. Now select the Three Columns: Scaling Center object (3col) and drag that into the lower section of the Padded box object already placed on your page.

    Creating a page using liquid layouts
  6. Position the liquid_virtechu page so that you can see the Files tab of the student.site.

  7. Select virtechu_logo.gif and drag and drop it to the top box in the liquid layout.

  8. Click to the right of the VirtechU logo, and then using the Standard Editing tool (Creating a page using liquid layouts), select the VirtechU logo. In the Basic tab of Image Inspector, select Left from the Alignment drop-down menu.

  9. Click to the right of the VirtechU logo to insert the text cursor. Press the spacebar once and type Tour the campus this summer.

  10. Choose File > Open. When the Open dialog window appears, browse to locate the text file named student.txt in the Lesson03 folder.

    Note

    Creating a page using liquid layouts If you recently opened this file for the previous part of this lesson you will find the student.txt file located in File > Open Recent.

  11. When the student.txt file opens, select the text above the dashed line and choose Edit > Copy. Return to the virtechu_liquid.html page and insert the cursor into the lower left cell and choose Edit > Paste.

    Creating a page using liquid layouts

    Note

    Don’t forget that you can easily navigate from one document to another using the file list at the bottom of the Window menu.

  12. Return to the student.txt file and select the text beneath the dashed line. Choose Edit > Copy. Return to the virtechu_liquid.html page and insert the cursor into the lower center cell and choose Edit > Paste.

    Note

    Note When referencing frequently used artwork or text, you can choose to save the elements as Snippets, making it easy to retrieve the elements frequently. Read more about Snippets in Lesson 10, “Using Stationeries, Components, Page Templates, and Snippets.”

  13. Position the liquid_virtechu page so that you can also see the Files tab of the student.site.

  14. Select tour.gif and drag and drop it to the box on the right in the liquid layout.

    Note
  15. Choose File > Save.

  16. Choose the Preview tab and drag the document window larger, then smaller to see how the page you created dynamically changes to fit the available space.

Note

If your text doesn’t look accurate in the GoLive Layout Preview window, click on the Preview in Browser button (Note) on the Main toolbar.

Congratulations! You have finished the lesson.

Exploring on your own

In this section you can open existing files to experiment with additional table and CSS options.

Experimenting with liquid layouts

  1. Choose File > Open and open the document named liquid.html.

  2. Choose Window > CSS to open the CSS palette.

  3. Notice the named CSS elements that are included as part of the liquid layouts on this page. Double-click on .colboxmiddle; the CSS Editor is displayed. Experiment with the various attributes to discover how each box in a liquid layout can be unique and contain many custom attributes.

  4. Choose File > Save.

Review

Review questions

1

As a default, what is the underlying code structure of a layout grid?

2

What are three methods for selecting a table cell?

3

What are three attributes that a table style will save?

Review answers

1

Layout grids are based on CSS, but can be easily changed to use standard HTML table code.

2

Select a table cell with any of these three methods:

  • Using the Standard Editing tool, click to insert the cursor into a cell. Then Press Ctrl+Enter. Pressing Ctrl+Enter again will select the table that the cell is in.

  • Choose Window > Table & Boxes. Use the Select table to activate cells, rows, and columns.

  • Using the Standard Editing tool, click to insert the cursor into a cell. Use the Document bar at the bottom of the window and locate the tag <td> in the source code hierarchy.

3

Table styles will save the following:

  • In the Table tab of the Table Inspector: Border, Color, Cell Pad, and Cell Space.

  • In the Row tab of the Table Inspector: Vertical Alignment, Horizontal Alignment, and Color.

  • In the Cell tab of the Table Inspector: Vertical Alignment, Horizontal Alignment, Color, Header Style, and No Text Wrap.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.164.141