34 users online (0 members and 34 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 2
  2. Coding Confusion    Forum: PHP Forum
    Replies: 5
  3. coding problem    Forum: HTML Forum
    Replies: 5
  1. #1
    ausammy's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Posts
    10

    Messy coding problem

    Hi im trying to fix up my fathers website but want it to look exactly the same as it does now. The code is a mess and even though the site works fine this means of course that it is not xhtml compliant. I want the two rows of links to look exactly the same but with clean coding... is that possible!? The site is at www.opr.com.au and this is the code:

    Code:
    <!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>Untitled Document</title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    
     <!-- logo table here--><table width="100%" border="0" cellpadding="0" cellspacing="0" class="logoback">
        <!--DWLayoutTable-->
        <tr>
          <td width="50%" height="80" valign="top"><img src="images/logos/opr_logo.jpg" width="421" height="80" /></td>
          <td width="32" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
          <td width="50%" valign="top"><img src="images/logos/phone.jpg" width="345" height="80" align="right"/></td>
        </tr>
        <tr>
          <td height="0"></td>
          <td></td>
          <td></td>
        </tr>
        <tr>
          <td height="1"></td>
          <td><img src="images/spacer.gif" alt="" width="32" height="1" /></td>
          <td><img src="images/spacer.gif" alt="" width="538" height="1" /></td>
        </tr>
      </table>
     
      <tr>
        <td colspan="2"> <!-- CHANGED BORDER PERCENTAGE FROM 98% to 100% --> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="menuspace1">
          <tr>
            <td colspan="2"><div align="center"><a href="../../default.htm"><strong>Home</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                  <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                </tr>
              </table>
            </td>
            <td><div align="center"><a href="../../about_us.htm"><strong>About Us</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../insurances.htm"><strong>Insurances</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table>                
            <td><div align="center"><a href="../../faqs.htm"><strong>FAQs</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../fact_sheets/main.htm"><strong>Useful
                    Buying &amp; Selling
              Info</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../links.htm"><strong>Links</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../contact_us.htm"><strong>Contact Us</strong></a></div></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td colspan="2"> <!-- CHANGED BORDER PERCENTAGE --> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="menuspace2">
          <tr>
            <td><div align="center"><a href="../../building_inspection/main.htm"><strong>Building Reports</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../strata_inspection/main.htm"><strong>Strata Reports</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../pest_inspection/main.htm"><strong>Pest Reports</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../survey_reports/main.htm"><strong>Survey Reports</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../property_valuation/main.htm"><strong>Valuations</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../testimonials.htm"><strong>Testimonials</strong></a></div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="menuline"><img src=" ../images/images/spacer.gif" width="2" height="12"></td>
                <td><img src=" ../images/spacer.gif" width="2" height="12"></td>
              </tr>
            </table></td>
            <td><div align="center"><a href="../../order_reports/main.htm"><strong>Order Reports</strong></a></div></td>
          </tr>
        </table></td>
      </tr>
      
    </body>
    </html>
    here is the css coding
    Code:
    body {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 12px;
        margin-top: 0px;
        margin-left: 0px;
        margin-right: 0px;
        background-color: #333366;
            }
        
    table {
        
    }
    
    h1 {
        font-size: 36px;
        }
    
    .promise {
        border: 1px solid #F8AF10;
        }
        
    .logoback {
        background-image: url(../images/background_images/opr_logo_bg.jpg);
        }
        
    .menuspace1 {
        background-image:url(../images/background_images/menu_bg_2.gif);
        background-repeat: repeat-x;
        background-position: left center;
        border-top-width: 1px;
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 1px;
        border-top-style: solid;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #000000;
        border-right-color: #000000;
        border-bottom-color: #000000;
        border-left-color: #000000;
        height: 20px;
        vertical-align: middle;
        font-weight:bold;
        }
    
    .menuspace2 {
        background-image:url(../images/background_images/menu_bg.gif);
        background-repeat: repeat-x;
        background-position: left center;
        border-top-width: 1px;
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 1px;
        border-top-style: solid;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #000000;
        border-right-color: #000000;
        border-bottom-color: #000000;
        border-left-color: #000000;
        height: 20px;
        vertical-align: middle;
        font-weight:bold;
        }
        
    a:link {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
    }
    a:visited {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
    }
    a:hover {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #CC0000;
        text-decoration: none;
    }
    a:active {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
    help would be much appreciated thankyou
    Last edited by ausammy; 02-26-2007 at 09:01 AM. Reason: missed the css file contents

  2. #2
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107

    Re: Messy coding problem

    You have some embedded tables in there that you probably don't need. Have you considered using lists instead? listamatic has about 50 different ways that you can control a list to make it horizontal etc. That might be better

  3. #3
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Re: Messy coding problem

    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  4. #4
    ausammy's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Posts
    10

    Re: Messy coding problem

    thanks heaps guys ill give them both a try!



Tags for this Thread