Publishers of technology books, eBooks, and videos for creative people

Home > Articles

  • Print
  • + Share This
This chapter is from the book

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.
  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.
  4. Select the Layout Grid object (gridobject.jpg) 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.

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 (selectwindow.jpg) 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.

  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.
  4. Click on the Select window button in the Main toolbar to bring the index.html page forward.
  5. Using the Object Selection tool (selectiontool.jpg), 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.

    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 (editing.jpg), 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.
  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.
  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.
  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 (aligntop.jpg) from the Align Objects section. If one or both of these choices are grayed out, the items are already aligned and/or distributed evenly.
  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 (selectiontool.jpg), 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 (imageobject.jpg). It is placed precisely where the blinking target insertion point appeared.
  3. With the Image Object still selected, choose the Browse button (browsebutton.jpg) 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.

  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 (boxobject.jpg) in the Basic section of 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 (editing.jpg), 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.
  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.
  8. Using the Standard Editing tool (editing.jpg), 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.

  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.
  11. Click and hold down on the arrow to the right of the Select window button (selectwindow.jpg) 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 (editing.jpg), 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.

    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.”
  7. With the text still selected, change the text color by double-clicking on the Set text color box (colorbox.jpg) 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.
  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 (editing.jpg), 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 (browsebutton.jpg) 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 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.

    You can reposition the Layout Text box object manually by crossing the edge of the text box; when a hand appears (handicon.jpg), 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.
  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.
  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 (editing.jpg), click to insert the cursor in the new colored text box. Click on the Align Center button (aligncenter.jpg) 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 (urlbutton.jpg), 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 (selectwindow.jpg) 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.
  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 (selectiontool.jpg), click on a blank area of the layout grid, then press the Optimize button on the Layout Grid Inspector.
  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 (sitefolder.jpg) 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 (editing.jpg), 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 (cssicon.jpg) to a table icon (tableicon.jpg). 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 (selectiontool.jpg), 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.

  4. Choose File > Save, then File > Close. Keep your student.site window open for the rest of this lesson.
  • + Share This
  • 🔖 Save To Your Account