Thread: Messy coding problem
Results 1 to 4 of 4
Related
-
Top banner/youtube div DONE.now I have a coding problem Forum: Myspace Forum
Replies: 2 -
Coding Confusion Forum: PHP Forum
Replies: 5 -
coding problem Forum: HTML Forum
Replies: 5
-
02-26-2007, 08:56 AM #1
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--> </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 & 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>
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;
Last edited by ausammy; 02-26-2007 at 09:01 AM. Reason: missed the css file contents
-
02-26-2007, 11:27 AM #2
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
-
02-26-2007, 11:31 AM #3
Re: Messy coding problem
This tool may help as well.
http://www.ahfb2000.com/javascript-m...p?sub=gen_form
-
02-27-2007, 07:00 AM #4
Re: Messy coding problem
thanks heaps guys ill give them both a try!