Dreamweaver template Doctype error

Can someone please help me to fix this annoying problem, website www.geckooptical.com the navigation bar is working correctly in firefox and also safari but the dropdown isnt working in internet explorer, i have included the code in this thread as i have it in dreamweaver ultradev but when i save it as a template the following code is installed in every webpage

<!-- InstanceBegin template=“/Templates/geckooptical.dwt” codeOutsideHTMLIsLocked=“false” –><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

I dont understand doctypes but i think it is something to do with the editable regions in the template, can someone please help me out with this, here is the code in dreamweaver before the above code is automatically saved in webpages:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable --> 
<meta name="description" content="Untitled Document" />

<meta name="keywords" content="Untitled Document" />

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

    <link rel="stylesheet" type="text/css" href="style.css" />

    <script type="text/javascript" src="jquery.js?ver=1.3.2"></script>

    <script type="text/javascript">

    var $ = jQuery;

    function suckerfishmenu(){

        $('#nav li').hover(function(){

            $(this).find('ul:first').css({visibility:'visible',display:'none'}).slideDown(300);

        },function(){

            $(this).find('ul:first').css({visibility:'hidden'});

        });

    }

    $(document).ready(function(){

        suckerfishmenu();

    });

    </script>



    <!--[if lte IE 7]><script type="text/javascript" src="suckerfish_ie.js"></script><![endif]-->





<link rel="stylesheet" href="styles.css" type="text/css" media="screen">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>



<body>

<table width="1024" border="0" align="center">
  <tr> 
    <td height="1500" valign="top"> 
      <table width="100%" height="34%" border="0" cellpadding="2">
        <tr> 
          <td width="21%" height="131"> 
            <div align="center"> <img src="../images/logo_small.jpg" width="200" height="30"><br>
<img src="../images/australia_flag.jpg">            </div></td>
          <td width="59%"><div align="center"> 
              <h1><img src="../images/microscope_laboratory.jpg" width="600" height="129"></h1>
            </div></td>
          <td width="20%"><div align="center"><a href="index.html">Home</a> | 
              <a href="contact.htm">Contact Us</a><br>
              <br>
              <font face="Arial, Helvetica, sans-serif"><font color="#000000"><strong>CALL: 
              08 9300 0301</strong></font></font></div></td>
        </tr>
        <tr valign="top"> 
          <td height="1296" colspan="3"> <ul id="nav" class="sf-menu">
              <li class="haschildren"><a href="../index.html">Microscopes</a> 
                <ul>
                  <li class="haschildren"><a class="moresuckerfish" href="../index.html">Microscopes 
                    Entry Level</a> 
                    <ul>
                      <li><a class="firstsecondlevel" href="../childrens_microscope.htm">Childrens 
                        Microscope </a></li>
                      <li><a href="../digital_microscope.htm">Digital Microscope</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../index.html">Microscopes 
                    Advanced Level </a> 
                    <ul>
                      <li><a class="firstsecondlevel" href="../monocular_biological_microscope.htm">Advanced 
                        Monocular Microscope</a></li>
                      <li><a href="../stereo_microscope.htm">Stereo Microscope 
                        </a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../index.html">Microscopes 
                    Professional Level </a> 
                    <ul>
                      <li><a href="../trinocular_biological_microscope.htm">Trinocular 
                        Biological Microscope</a></li>
                      <li><a href="../professional_biological_microscope.htm">Professional 
                        Biological Microscope</a></li>
                      <li><a href="../nikon_eclipse_e100_biological_microscope.htm">Nikon 
                        Eclipse E100 Biological Microscope</a></li>
                      <li><a href="../stereo_zoom_microscope.htm">Stereo Zoom 
                        Microscope</a></li>
                      <li><a href="../stereo_zoom_trinocular_microscope.htm">Stereo 
                        Zoom Trinocular Microscope</a></li>
                      <li><a href="../stereo_boom%20_stand_microscopes.htm">Stereo 
                        Boom Stand Microscopes</a></li>
                      <li><a href="../nikon_smz445_stereo_zoom_microscope.htm">Nikon 
                        SMZ445 Stereo Microscope</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a class="moresuckerfish" href="../dino_lite_microscope_eyepiece_camera.htm">Microscope 
                    Cameras </a> 
                    <ul>
                      <li><a class="firstsecondlevel" href="../dino_lite_microscope_eyepiece_camera.htm">Microscope 
                        Camera Eyepiece 1.3mp</a></li>
                      <li><a href="../3_megapixel_microscope_camera_eyepiece.htm">Microscope 
                        Camera Eyepiece 3.0mp</a></li>
                    </ul>
                  </li>
                  <li><a href="../index.html">Dino-Lite Microscopes</a></li>
                  <li class="haschildren"><a href="../dino_lite_am211_am311s.htm">Dino-Lite 
                    Basic</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_am211.htm">Dino-Lite 
                        AM211 Handheld Digital USB Microscope</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am311s.htm">Dino-Lite 
                        AM311S Handheld Digital USB Microscope</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_am411t_am413t_am413tl_am413zt.htm">Dino-Lite 
                    Pro</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_am411t.htm">AM411T-Dino-Lite 
                        Pro Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413t.htm">AM413T-Dino-Lite 
                        Pro Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413t5.htm">AM413T5 
                        Dino-Lite Handheld Digital USB Microscope</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413tl.htm">AM413TL-Dino-Lite 
                        Pro LWD Handheld Digital Microscope USB </a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413zt_polarizer.htm">AM413ZT-Dino-Lite 
                        Pro POLARIZER Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413t_fvw_am413tl_fvw.htm">AM413T-FVW-Dino-Lite 
                        Pro White/UV LED Handheld Digital Microscope USB</a> </li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_am313t_am313t5_am313fvt.htm">Dino-Lite 
                    Plus</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_am313t.htm">AM313T- 
                        Dino-Lite Plus Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am313t5.htm">AM313T5-Dino-Lite 
                        Plus Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am313fvt.htm">AM313FVT- 
                        Dino-Lite Fluorescense Handheld Digital Microscope USB</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_am413m_am413mt.htm">Dino-X-Lite 
                    Plus</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413m.htm">AM413M-Dino-Lite 
                        X Handheld Digital Microscope USB</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am413mt.htm">AM413MT-Dino-Lite 
                        Handheld Digital Microscope USB</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_medical_care.htm">Dino-Lite 
                    Medical</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_amh_rut.htm">AMH-RUT-Dino-Lite 
                        Digital Iriscope Medical Care Digital Microscope</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am311h.htm">AM311H-Dino-Lite 
                        Earscope Medical Care Digital Microscope </a> </li>
                      <li><a href="http://www.geckooptical.com/dino_lite_amh_eut.htm">AMH-EUT-Dino-Lite 
                        Pro Earscope Medical Care Digital Microscope</a> </li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_microscope_eyepiece_camera.htm">Dino-Lite 
                    Microscope Cameras</a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_am423_dinoeye.htm">AM423-Dino-Eye 
                        USB Microscope Eyepiece Camera</a></li>
                      <li><a href="http://www.geckooptical.com/dino_lite_am423b_dinoeye.htm">AM423B-Dino-Eye 
                        USB Microscope Eyepiece Camera</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../dino_lite_amk412_c200.htm">Dino-Lite 
                    Mobile </a> 
                    <ul>
                      <li><a href="http://www.geckooptical.com/dino_lite_amk412_c200.htm">Dino-Lite 
                        AMK412-C200 Microscope</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a href="../index.html">Dino-Lite Accessories 
                    </a> 
                    <ul>
                      <li><a href="../dinolite_stand_ms12c.htm">MS12C Holder</a></li>
                      <li><a href="../dinolite_ms32w_stand.htm">MS32W Flexible 
                        Arm</a></li>
                      <li><a href="../dinolite_ms33w_stand.htm">MS33W Flexible 
                        Arm</a></li>
                      <li><a href="../dinolite_ms35b_stand.htm">MS35B Stand</a></li>
                      <li><a href="../dinolite_ms36b_stand.htm">MS36B Boom Stand</a></li>
                      <li><a href="../dinolite_ms16c.htm">MS16C Multi-Position 
                        Arm</a></li>
                      <li><a href="../dinolite_ms15x.htm">MS15X X-Y Base</a></li>
                      <li><a href="../dinolite_bl_zw1_backlit_pad.htm">Dino-Lite 
                        BL-ZW1 Backlit Pad</a></li>
                      <li><a href="../dinolite_ms_w1_holder.htm">Dino-Lite MS-W1 
                        Holder</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
              <li class="haschildren"><a href="../index.html">Laboratory Equipment 
                </a> 
                <ul>
                  <li><a href="../centrifuge.htm">Benchtop Centrifuge</a></li>
                  <li><a href="../microhematocrit_centrifuge.htm">Microhematocrit 
                    Centrifuge</a></li>
                  <li><a href="../microscope_slides_warmer_small.htm">Slide Warmer 
                    Small</a></li>
                  <li><a href="../microscope_slides_warmer_large.htm">Slide Warmer 
                    Large</a></li>
                  <li><a href="../digital_water_bath.htm">Digital Water Bath</a></li>
                  <li class="haschildren"><a class="moresuckerfish" href="../dewar_flasks.htm">Dewar 
                    Flasks &amp; Vessels</a> 
                    <ul>
                      <li><a class="firstsecondlevel" href="../dewar_flasks_cylinder_type.htm">Dewar 
                        Flasks Cylindrical Type</a></li>
                      <li><a href="../dewar_flasks_flat_bottom.htm">Dewar Flasks 
                        with Flat Bottom</a></li>
                      <li><a href="../dewer_flask_stainless_steel.htm">Dewar Flasks 
                        Stainless Steel</a></li>
                      <li><a href="../dewar_carrying_flask.htm">Dewar Carrying 
                        Flasks</a></li>
                    </ul>
                  </li>
                  <li class="haschildren"><a class="moresuckerfish" href="../kgw_isotherm_cryo_vessels.htm">Cryo 
                    Vessels</a> 
                    <ul>
                      <li><a class="firstsecondlevel" href="../cryo_vessel_apollo.htm">Apollo 
                        Type</a></li>
                      <li><a href="../alu_type_cryo_vessels.htm">ALU Type</a></li>
                    </ul>
                  </li>
                  <li><a href="../silicone_tubing.htm">Medical Silicone Tubing</a></li>
                </ul>
              </li>
              <li><a href="../index.html">Special Offers</a></li>
              <li><a href="../contact.htm">Contact Us</a></li>
            </ul>
            <table width="100%">
              <tr> 
                <td height="34"><!-- TemplateBeginEditable name="EditRegion3" --><!-- TemplateEndEditable --></td>
              </tr>
            </table> <table width="100%">
              <tr> 
                <td><div align="right"><a href="contact.htm">Contact Us</a> | 
                    <a href="about_us.htm">About Us</a> | <a href="delivery_policy.htm">Delivery 
                    Policy</a> | <a href="returns_policy.htm">Returns Policy</a> 
                    |<a href="privacy_policy.htm"> Privacy Policy</a></div></td>
              </tr>
            </table>
            <p align="center">GeckoOptical.com &copy;2001-2010</p></td>
        </tr>
        <tr> </tr>
      </table></td>
  </tr>
</table>

</body>

</html>

Hi,

Change your doctype to this otherwise you will trigger quirks mode with the doctype you are using.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Make sure that there is no code above the doctype (including template code).

You don’t seem to be supporting IE6 anyway as the suckerfish routine seems to be missing.

[FONT=Arial][SIZE=2]I tried as you suggested but if you look at the view source you will see that dreamweaver added the following code:

[/SIZE][/FONT][FONT=Arial][SIZE=2]<!-- InstanceBegin template=“/Templates/geckooptical.dwt” codeOutsideHTMLIsLocked=“false” –>

The sons of suckerfish navbar still isnt working in IE, ironically i have had it working in IE a couple of days ago but i can only guess i have done something to the code, maybe something to do with the editable regions.

[/SIZE][/FONT]

Hi,

The answer is the same but I don’t know how you fix it as I don’t use DW templates - sorry. It seems you have corrupted the template in some way as those comments should follow the doctype and not be before it.

It seems others have done the same thing (see comments here).

I suggest you try to rebuild the template correctly as you cannot have any content above the doctype or that will trip IE into quirks mode.

When you create a new template in DW it looks like this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

<body>
</body>
</html>


I can tell you that I copied your page locally and removed the code above the doctype and it was working in ie7 and ie8 straight away with no problem. It was not working in IE6 because you have omitted the suckerfish javascript that ie6 needs.

Well i got it to work in IE after changing the code as you suggested, thanks for that.
But the following code now appears between the head tags

<!-- InstanceBegin template=“/Templates/geckooptical.dwt” codeOutsideHTMLIsLocked=“false” –>

Can i leave it like this and if i do what problems will i incur?
Thanks Steve

<?xml version=“1.0” encoding=“utf-8”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
</head>
<!-- InstanceBegin template=“/Templates/geckooptical.dwt” codeOutsideHTMLIsLocked=“false” –>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<!-- InstanceBeginEditable name=“doctitle” –>
<title>Professional Biological Trinocular Microscope</title>
<!-- InstanceEndEditable –>
<!-- InstanceBeginEditable name=“head” –><!-- InstanceEndEditable –>
</head>

Hi Steve,

You still need to get rid of the xml declaration as that trips up IE6. It’s optional anyway so get rid of it.


<?xml version="1.0" encoding="utf-8"?>

But the following code now appears between the head tags

<!-- InstanceBegin template=“/Templates/geckooptical.dwt” codeOutsideHTMLIsLocked=“false” –>

From my limited understanding of DW that should be ok because that code is for allowing dynamic content to be placed outside of the html page (such as php etc) that won’t be displayed in the browser source.

Hi Paul
I cannot find the following code in template or in html source code
<?xml version=“1.0” encoding=“utf-8”?>
Where are you looking at to find this?

Thanks

It was in the code you posted in your post #5.:slight_smile:

I’m guessing you are using an old version of DW as CS3 doesn’t add the xml declaration