Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Chrome/Firefox Browser problem

    Hi, Everyone,
    I wonder if someone could shed a bit of light on my problem, please.
    I'm in the middle of writing a website, but I've hit a snag when viewing on different browsers; it works fine in IE, but in Chrome and Firefox, it displays to the left instead of centrally. I've tried aligning to centre with all the tags, but it still shows to the left in the other browsers.
    Here's the code:

    Code:
    <!DOCTYPE HTML PUBLIC
    "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.W3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Diagnostics</title>
    <link type="text/css" rel="stylesheet" href="newwebsitetemplate.css">
    <script type="text/javascript">
    // Copyright 2006-2007 javascript-array.com
    
    var timeout	= 500;
    var closetimer	= 0;
    var ddmenuitem	= 0;
    
    // open hidden layer
    function mopen(id)
    {	
    	// cancel close timer
    	mcancelclosetime();
    
    	// close old layer
    	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
    
    	// get new layer and show it
    	ddmenuitem = document.getElementById(id);
    	ddmenuitem.style.visibility = 'visible';
    
    }
    // close showed layer
    function mclose()
    {
    	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
    }
    
    // go close timer
    function mclosetime()
    {
    	closetimer = window.setTimeout(mclose, timeout);
    }
    
    // cancel close timer
    function mcancelclosetime()
    {
    	if(closetimer)
    	{
    		window.clearTimeout(closetimer);
    		closetimer = null;
    	}
    }
    
    // close layer when click-out
    document.onclick = mclose; 
    </script>
    </head>
    
    <body>
    <table>
      <tr>
        <td><div align="center">
            <table>
              <tr>
    
    
                <td style="text-align:center;"><img src="https://secure.romancart.com/secure/images/4921KGK15673FGFJ1.gif"></td></tr>
    
                <td><br /><br /><table class="pluto"><tr>
    
    <tr><td>
    
    
    
    <tr><td><a href="pricelist.htm">Price List/Index</td></tr>
    <tr>
    <td><a href="newproducts.htm">New Products</td></tr>
    <tr>
    <td><a href="offers.htm">Bulk Buys/Offers</td></tr>
    <tr>
    <td><a href="clearance.htm">Clearance</td></tr>
    <tr>
    <td><a href="bargainbasement.htm">Bargain Basement</td></tr>
    <tr>
    <td><a href="links.htm">Useful Links</td></td>
    <tr>
    <td><a href="termsandconditions.htm">Terms & Conditions</td></tr>
    <tr>
    <td><a href="contactus">Contact Us</td></tr></td>
            </tr>
    </tr></table>
            <tr>
              <td style="text-align:left;"><br /><br /><table class="mercury">
    
    <tr>
    <td>Basket Contents:&nbsp;&nbsp;&nbsp;<span style="color:#484848;"><SCRIPT LANGUAGE="JavaScript" SRC="http://www.romancart.com/cartinfo.asp?storeid=15673&type=1"></SCRIPT></span>&nbsp;items</tr></td>
    <tr>
    <td>Basket Value:&nbsp;<span style="color:#484848;"><SCRIPT LANGUAGE="JavaScript" SRC="http://www.romancart.com/cartinfo.asp?storeid=15673&type=3"></SCRIPT></span>&nbsp;ex.vat</td></tr>
    <tr>
    <td><a href="http://www.romancart.com/cart.asp?storeid=15673">View Basket/Go to Checkout</a></td></tr>
    
    </tr>
    </table></td>
            </tr>
            <tr>
              <td style="text-align:left;"><br /><br /><table class="neptune">
    <tr><td>
    
    <td>Product Search<br />
    <div style="font-size:0.8em;color:gray;line-height:1em;">Enter 
              word, description<br />
              or code in box:<br />
    <form action='http://www.romancart.com/search.asp'>
            <input type=hidden value=15673 name=storeid>
            <input type=text value='' name=searchterm>
            <input name="submit" type=submit value='Go'>
            </form>
    </div>
    
    </tr></td>
    </td>
    </tr>
    </table></td></td>
            </tr>
          </table></td>
    
    <td style="vertical-align:top;">
                    <table style="vertical-align:top;">
                      <tr>
                        <td height="27"><table class="perky">
    
    <td><a href="instruments.htm">Instruments &<br />Equipment</td>
    <td><a href="dressings.htm">Dressings &<br />Adhesives</td>
    <td><a href="paddings.htm">Paddings &<br />Appliances</td>
    <td><a href="hygiene.htm">Sterilization &<br />Hygiene</td>
    <td><a href="domiciliary.htm">Domiciliary</td>
    <td style="background-color:#BAC4F3;border-bottom-color:#BAC4F3;color:white;">Diagnostics</td>
    <td><a href="miscellaneous.htm">Miscellaneous</td>
    
    </tr>
    
    </table></td>
                      </tr>
                      <tr>
                        <td class="earth">
    <h1 style="text-align:center"><br />Diagnostics</h1></td>
                      </tr>
                      <tr>
                        <td class="charlie">Essential equipment for speedy and accurate diagnoses</td>
                      </tr>
    
                      
    
    <tr style="text-align:center;">
                        
    
    <div align="center">
    
                               <td style="text-align:center;"><ul id="sddm">
        
    
    
    <br /><ul id="tddm">
        <li><a href="#" 
            onmouseover="mopen('m1')" 
            onmouseout="mclosetime()">BP</a>
            <div id="m1" 
                onmouseover="mcancelclosetime()" 
                onmouseout="mclosetime()">
    
            <a href="#">Sphygmo</a>
            <a href="#">Stethoscope</a>
           
            
    </div>
    
    
        </li>
    
    
    
        <li><a href="#" 
            onmouseover="mopen('m2')" 
            onmouseout="mclosetime()">Sensation</a>
            <div id="m2" 
                onmouseover="mcancelclosetime()" 
                onmouseout="mclosetime()">
            <a href="#">Tip-therm</a>
            <a href="#">Monofilament</a>
            
            
            </div>
        </li>
        <li><a href="#" 
            onmouseover="mopen('m3')" 
            onmouseout="mclosetime()">Visual</a>
            <div id="m3" 
                onmouseover="mcancelclosetime()" 
                onmouseout="mclosetime()">
            <a href="#">Dermatoscope</a>
            <a href="#">Penlight</a>
            
           </div> 
            
    </li>
    
    </div>
    </td></tr>
            </table>
          </div></td>
      </tr>
    </table>
    </body>
    </html>
    As you can see, it's fine in IE, but not in the others. I've been over the code looking for unclosed tags, etc, but can't fathom it out.
    I'd be so grateful if anyone can advise.
    Many thanks in advance.
    Graham

  • #2
    Regular Coder
    Join Date
    Jun 2010
    Location
    Earth
    Posts
    305
    Thanks
    27
    Thanked 2 Times in 2 Posts
    You can do this

    Code:
    <tr><td align=center><a href="pricelist.htm">Price List/Index</td></tr
    >

    Also when posting code its helps others if you clean it up so its not so hard to read thru.


  •  

    Posting Permissions

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