treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Jquery Dropdown Menu not working with slideshow banner

  • I need help! Here is the page I'm having issues with http://thompsoninsurancefl.com/

    As you will see, the photo banner uses a jquery plugin for the "slideshow" or photos fading in and out. I also used the simple jquery drop down menu that I found on this site (http://css-tricks.com/simple-jquery-dropdowns/). The drop down menu worked fine before adding the slide show banner, however now just part of the menu works. "Property & Casualty" and "Commercial" should have a dropdown menu like the "About" link, but for some reason, the dropdown doesn't work with the slide show.

    Here is the html
    <!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=UTF-8\" />
    <title>The Thompson Agency | Insurance for Auto, Home or Business in Ft. Myers, Florida</title>
    <link href=\"oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />
    <script type=\"text/javascript\" src=\"js/jquery-1.3.1.min.js\"></script>
    <script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.dropdownPlain.js\"></script>
    <script type=\"text/javascript\" src=\"js/slideshow.js\"></script>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#slideshow').slideshow({
    timeout: 4000,
    type: 'sequence'
    });
    });
    </script>
    </head>

    <body class=\"oneColFixCtr\">
    <div id=\"main_wrapper\">
    <div class=\"wrapper\">
    <div id=\"header\">
    <div id=\"logo\"><img src=\"images/TTA_logo.png\" width=\"223\" height=\"75\" alt=\"Thompson Agency logo\" /></div>
    <div id=\"tagline\"><p class=\"tagline\">Delivering peace of mind, one client at a time.</p>
    </div>
    <div id=\"address\"><p class=\"headeraddress\">4531 Deleon Street, Suite 207<br />Ft. Myers, Florida 33907<br />ph 239.278.5822 | fax 239.278.1074</p>
    </div>
    </div> <!-- end #header -->
    <div id=\"topnav\">
    <ul class=\"dropdown\">
    <li><a href=\"#\">Property &amp; Casualty</a>
    <ul class=\"sub_menu\">
    <li><a href=\"#\">Auto</a></li>
    <li><a href=\"#\">Homeowners</a></li>
    <li><a href=\"#\">Renters</a></li>
    <li><a href=\"#\">Flood</a></li>
    <li><a href=\"#\">Recreational Vehicles</a></li>
    <li><a href=\"#\">Personal Umbrella</a></li>
    </ul>
    </li>
    <li><a href=\"#\">Commercial</a>
    <ul class=\"sub_menu\">
    <li><a href=\"#\">Auto</a></li>
    <li><a href=\"#\">Property</a></li>
    <li><a href=\"#\">Liability</a></li>
    </ul>
    </li>
    <li><a href=\"#\">Life &amp; Retirement</a></li>
    <li><a href=\"#\">Health Insurance</a></li>
    <li><a href=\"#\">Location</a></li>
    <li><a href=\"#\">About Us</a>
    <ul class=\"sub_menu\">
    <li><a href=\"#\">History</a></li>
    <li><a href=\"#\">Management</a></li>
    </ul>
    </li>
    <li><a href=\"#\">Contact Us</a></li>
    </ul>
    </div>
    <div id=\"photo_banner\">
    <div id=\"slideshow\">
    <img src=\"images/slide_1.jpg\" alt=\"Girl driver\" />
    <img src=\"images/slide_2.jpg\" alt=\"Couple in front of house\"/>
    <img src=\"images/slide_3.jpg\" alt=\"Business man driver\"/>
    <img src=\"images/slide_4.jpg\" alt=\"Grandparents with grand daughter in Marina\"/>
    </div>
    <div id=\"quote\"><img src=\"images/clickhere_button.png\" alt=\"click here button\" /> </div>
    </div>
    <!-- end #photo_banner -->

    <div id=\"categories\">
    <div class=\"column1\"><img src=\"images/car.jpg\" alt=\"photo of auto\" />
    <h3>Property &amp; Casualty Insurance</h3>
    <p class=\"bodytext\">We can write a policy to cover all of your personal assets.</p>
    <p><a href=\"#\" class=\"learnmore\">Learn more.</a></p>
    </div>
    <div class=\"column2\"><img src=\"images/commercialbuilding.jpg\" alt=\"photo of building\" />
    <h3>Commercial Insurance</h3>
    <p class=\"bodytext\">Protect your business assets: auto, property and liability.</p>
    <p><a href=\"#\" class=\"learnmore\">Learn more.</a></p>
    </div>
    <div class=\"column3\"><img src=\"images/life_photo.jpg\" alt=\"photo of couple\" />
    <h3>Property &amp; Casualty Insurance</h3>
    <p class=\"bodytext\">Plan ahead and learn to invest wisely.</p>
    <p><a href=\"#\" class=\"learnmore\">Learn more.</a></p>
    </div>
    </div>
    <div class=\"clear\">&nbsp;</div>
    </div>
    <!-- end #wrapper -->
    <div class=\"footer\">
    <a href=\"#\">Home</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Property &amp; Casualty</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Commercial Insurance</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Life &amp; Retirement Insurance</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Health Insurance</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">About Us</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Location</a>
    <span class=\"bottomnav_divider\">|</span><a href=\"#\">Contact Us</a>
    <p>©2009 The Thompson Agency, Inc. - All rights reserved</p>
    </div>
    </div>
    <!-- end #main_wrapper -->
    </body>
    </html>


    And the CSS
    @charset \"UTF-8\";
    html, body, #main_wrapper {height: 100%;}
    body {
    font: 100% Arial, Helvetica, sans-serif;
    margin: 0 auto; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    background-image: url(images/bcknd_gradient.gif);
    background-repeat: repeat-x;
    height: 100%;
    }
    .oneColFixCtr #main_wrapper {
    width: 975px;
    background-image: url(images/bcknd_shadow.png);
    text-align: left;
    height:auto;
    min-height: 100%;
    margin: 0 auto ;
    }
    .oneColFixCtr .wrapper {
    width: 840px;
    margin-left: 65px;
    }#header {
    height: 75px;
    padding-top: 37px;
    }
    #logo {
    width: 230px;
    float: left;
    display: inline;
    }.tagline {
    font-family: Georgia, \"Times New Roman\", Times, serif;
    font-size: 14px;
    font-style: italic;
    color: #666666;
    }
    #tagline {
    float: left;
    display: inline;
    padding-top: 38px;
    width: 290px;
    padding-left: 50px;
    }
    #address {
    float: left;
    display: inline;
    padding-left: 30px;
    width: 240px;
    }
    .headeraddress {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #666666;
    text-align: right;
    line-height: 19px;
    padding-left: 25px;
    }
    #photo_banner {
    height: 240px;
    border-top: solid 2px #0098db;
    border-bottom: solid 2px #0098db;
    background-image: url(images/needaquote.gif);
    background-repeat: no-repeat;
    background-position: top right;
    clear: both;
    }
    #slideshow {
    float: left;
    width: 569px;
    display: inline;
    height: 240px;
    position: relative;
    }
    #slideshow img {
    left: 0px;
    top: 0px;
    position: absolute;
    }
    #quote {
    float: left;
    display: inline;
    padding-left: 130px;
    padding-top: 155px;
    width: 130px;
    }
    #categories {
    margin-top: 35px;
    height: 290px;
    overflow: hidden;
    clear: both;
    }
    .column1 {
    width: 270px;
    float: left;
    margin-right: 0px;
    padding-left: 10px;
    }
    .column2 {
    width: 268px;
    float: left;
    border-left: solid 1px #999999;
    border-right: solid 1px #999999;
    padding-left: 10px;
    }
    .column3 {
    width: 270px;
    float: left;
    padding-left: 10px;
    }
    .bodytext {
    font-size: 13px;
    color: #666666;
    line-height: 18px;
    }
    h1 {
    font-size: 20px;
    color: #0066A4;
    font-weight: normal;
    text-transform: uppercase;
    }
    h2 {
    font-size: 18px;
    color: #0066A4;
    font-weight: normal;
    }
    h3 {
    font-size: 14px;
    color: #666666;
    margin-bottom: -12px;
    }
    .footer {
    height: 50px;
    background-color: #0066A4;
    width: 840px;
    text-align: center;
    margin-left: 65px;
    padding-top: 10px;
    margin-top: 15px;
    } .footer a {
    text-decoration: none;
    color: #FFFFFF;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 12px;
    } .footer a:hover {
    color:#a2d3e7;
    } .footer p {
    font-size: 11px;
    color: #a2d3e7;
    margin-top: 8px;
    }
    .push {
    height: 70px;
    }
    .bottomnav_divider {color: #FFFFFF}
    #topnav {
    float: left;
    margin-top: 20px;
    width: 840px;
    margin-left: -15px;
    }
    ul {
    list-style: none;
    }
    /*
    LEVEL ONE
    */
    ul.dropdown { position: relative; }
    ul.dropdown li {
    font-weight: normal;
    float: left;
    zoom: 1;
    background: #ffffff;
    }
    ul.dropdown a:hover {
    color: #5ccaf0;
    }
    ul.dropdown a:active {
    color: #5ccaf0;
    }
    ul.dropdown li a {
    display: block;
    padding: 5px 13.5px;
    border-right: 1px solid #0098db;
    color: #0098db;
    font-size: 14px;
    text-decoration: none;
    }
    ul.dropdown li:last-child a { border-right: none; } /* Doesn't work in IE */
    ul.dropdown li.hover,
    ul.dropdown li:hover {
    background: #0098db;
    color: #FFFFFF;
    position: relative;
    }
    ul.dropdown li.hover a {
    color: #FFFFFF;
    }


    /*
    LEVEL TWO
    */
    ul.dropdown ul {
    width: 160px;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0px;
    }
    ul.dropdown ul li {
    font-weight: normal;
    background: #5ccaf0;
    color: #000;
    border-bottom: 1px solid #ffffff;
    float: none;
    }
    /*
    LEVEL THREE
    */
    ul.dropdown ul ul {
    left: 100%;
    top: 0;
    }
    ul.dropdown li:hover > ul { visibility: visible; }

    /* IE 6 & 7 Needs Inline Block */
    ul.dropdown ul li a { border-right: none; width: 100%; display: inline-block; }
    .learnmore {
    font-size: 13px;
    color: #FFFFFF;
    line-height: 18px;
    text-decoration: none;
    background-color: #FF9900;
    padding: 2px 5px 2px 5px;
    }
    .clear {
    clear: both;
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0;
    }


    I'm thinking that the slideshow is somehow interfering with the drop down menu because of the relative and absolute positioning on the #slideshow and #slideshow img and the menu uls also use relative and absolute positioning but I don't know how to fix it.???

    Please help!