SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Location
    Chicago
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    List Code Placement

    PLEASE HELP!
    I'm working on a project and I want to add the following code to my page, but it's not working out. My table may be a mess.

    <h2>Fresh Fruits</h2>

    <ul>
    <li>Strawberries</li>
    <li>Kiwi</li>
    <li>Pineapple</li>
    <li>Apples</li>
    <li>Bananas</li>
    </ul>

    <h2>Dipped Items</h2>

    <ul>
    <li>Oreos</li>
    <li>Marshmallows</li>
    <li>Pretzels</li>
    <li>Gummie Treats</li>
    </ul>

    This is my page code. Would someone show me where to place the above list code in the below code so the list is in the table to the left of the images?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Custom Chocolate Menu</title>

    </head>

    <body>

    <map name="Map" id="Map"><area shape="rect" coords="449,6,528,96" href="menu.htm" />
    <area shape="rect" coords="549,5,633,96" href="contactform.htm" alt="Contact Us" />
    </map>

    <table width="700" border="0" align="center" cellpadding="5" cellspacing="0">
    <tr>
    <th colspan="2" bgcolor="#FCE9C4" scope="col"><img src="images/header.gif" alt="Custom Chocolates" width="650" height="100" border="0" usemap="#Map" /></th>
    </tr>
    <tr>
    <th width="375" valign="top" bgcolor="#FCE9C4">
    </th>
    <th width="375" height="650" align="center" valign="top" bgcolor="#FCE9C4" scope="row"><p><img src="images/choc2.jpg" width="200" height="267" /></p>
    <p><img src="Images/choc15.jpg" alt="Chocolate Apple" width="200" height="260" /></p></th>
    </tr>
    </tr>
    </table>
    </body>
    </html>


    Thank you in advance, Karen
    Last edited by Karen615; Jul 28, 2009 at 19:27. Reason: Addition

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My table may be a mess.
    Yep, your table is a mess, clear that up and come back.

    To answer your question, without checking and thinking more about it - there might be a far better solution than to use tables, your lists should go here those two:

    Code:
    <td width="375" valign="top" bgcolor="#FCE9C4">
    <h2>Fresh Fruits</h2>
    
    <ul>
    <li>Strawberries</li>
    <li>Kiwi</li>
    <li>Pineapple</li>
    <li>Apples</li>
    <li>Bananas</li>
    </ul>
    
    <h2>Dipped Items</h2>
    
    <ul>
    <li>Oreos</li>
    <li>Marshmallows</li>
    <li>Pretzels</li>
    <li>Gummie Treats</li>
    </ul>
    </td>
    I've also changed th to td to make it semantically correct. One other thing, give your images an alt text.
    Dan G
    Marketing Strategist & Consultant


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •