spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

Logo

HOME | EXPERTS | GRAPHICS | column 53

Menus with Beauty and Brains As a Book: Chapter 13 (con't)

 

Download the files for this exercise. The document elementsdone.html, which is included, is the finished page for reference.

 

Note

The design elements have been used to form a quasi logo at the top of the page to help balance the design. Although this is rarely the way that I create a page header, it does show the power and versatility of design elements.

 

Tip

The spacer.gif image that appears at the end of the menu links is used to provide a right margin for the menu without complicated tables. Using a clear GIF file as a spacer in your document is a code-efficient method to have a little extra control over your text.

 

Figure 13-10
All page elements added and previewed in Internet Explorer 5.5.

Note: Click on the image above for a larger view of the image.


Exercise: Using Design Elements to Enhance Text

Although most of the following exercise is common sense, it can help to do one sample of a technique to fix it in your mind. I covered CSS in Chapter 9, so for this exercise I have included the complete CSS style sheet to just attach to your page. If you want a challenge, try creating this page on your own, creating your own CSS style sheet and graphics. Once you can do that, you are well on your way to exploiting text to the fullest in Web design.

To create a page using design elements in your favorite HTML editor, follow these steps:

  1. Open the document elements.html, found in the folder you copied to your hard drive. This HTML document has a header and text in place, and is linked to a style sheet. You will add the design elements and CSS commands to finish the page.

  2. Add a CSS ID element called "menu" to the menu at the top right of the page. Locate the code for the menu and surround the menu code with <div id="menu"> and </div>. The completed code will be as follows:

    <div id="menu"><a href="#1">Home</a>| <a href="#2">Products</a> | <a href="#3">Services</a> | <a href="#4">Join</a> | <a href="#5">Contact</a><img src="spacer.gif" width="20" height="8" border="0"></div>

  3. Apply a CSS span style called "sidehead" to the "LATEST NEWS" item in the left side menu. Your code should be as follows:

    <a href="#" class="sidehead">LATEST NEWS</a>

    Repeat for the three remaining links in that menu.

  4. Insert the image file, red_trismall.gif, into the table cell to the left of the "LATEST NEWS" menu item in the left side menu. Add the same image to the corresponding cells for the three remaining menu items.

  5. Insert the image file, red_trismall.gif, at the start of the headline, Headline One, in the first content column. Add the CSS span style. Your code should be as follows:

    <img src="red_trismall.gif" width="15" height="22">Headline One<br>

  6. Apply a CSS span style called "bodyhead" to the headline and image created in Step 5. Your code will now be:

    <span class="bodyhead"><img src="red_trismall.gif" width="15" height="22">Headline One</span>
    Repeat steps 5 and 6 for "Headline Two."

  7. Apply an unordered list tag (<ul> and </ul>) to the second through fifth paragraphs in the text in the Headline One cell. The bullet that appears when previewed in Internet Explorer is assigned in the CSS style sheet that is associated with this document. (The effect will not show up in Netscape.)

  8. Insert the imag, red_lineshort.gif, between the first and second paragraphs of the Headline Two cell. Set alignment to center. Repeat inserting and aligning the image between the second and third paragraphs of the same cell.

  9. Preview your image in Internet Explorer. The result should resemble Figure 13-10

   
 

You may want to carry on, trying new ways to use the design elements. The file that you downloaded for this exercise contains extra design elements not used for this exercise for you to work with on your own.

   


Images and text for this article © Hungry Minds, Inc.

 

Back to start

Menus with Beauty and Brains as a Book: Tutorial Index

Ta!Da!
Table of Contents
Chapter 13
Chapter 13 (con't)
Chapter 13 Exercise

Front page2345

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management

Created by Wendy Peck,

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering MySQL Databases on the Web Using PHP · Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
So what is an Oracle Nested Table? · E-Discovery Architectures 101 · eBay Embraces Big Sellers, Cyber Monday Trends


URL: http://www.webreference.com/graphics/books/menus/
Created: March 8, 2002
Revised: March 8, 2002