Results 1 to 2 of 2

Thread: Drop Down Menus different in IE and FF

  1. #1
    Join Date
    Apr 2009
    Thanked 0 Times in 0 Posts

    Default Drop Down Menus different in IE and FF

    Hi. I'm creating a website with iWeb. I used dynamic drive codes to create a elementary school website with horizontal drop down menus at the top of the website. The menus look fine on Firefox and Safari, but the entire menu is different on IE. Here's the website address:

    Here is the code I used. Can anyone tell me what's going on with IE? I really don't understand css/html too well.

    <style type="text/css">
    /*Credits: Dynamic Drive CSS Library */
    /*URL: */
    .suckertreemenu ul{
    margin: 1;
    padding: 0;
    list-style-type: none;
    /*Top level list items*/
    .suckertreemenu ul li{
    position: relative;
    display: inline;
    float: left;
    background-color: #F3F3F3; /*overall menu background color*/
    /*Top level menu link items style*/
    .suckertreemenu ul li a{
    display: block;
    width: 90x; /*Width of top level menu link items*/
    padding: 5px 20px;
    border: 2px solid black;
    border-center-width: 1;
    text-decoration: none;
    color: blue;
    /*1st sub level menu*/
    .suckertreemenu ul li ul{
    left: 0;
    position: absolute;
    top: 1em; /* no need to change, as true value set by script */
    display: block;
    visibility: hidden;
    /*Sub level menu list items (undo style from Top level List Items)*/
    .suckertreemenu ul li ul li{
    display: list-item;
    float: none;
    /*All subsequent sub menu levels offset after 1st level sub menu */
    .suckertreemenu ul li ul li ul{ 
    left: 159px; /* no need to change, as true value set by script */
    top: 0;
    /* Sub level menu links style */
    .suckertreemenu ul li ul li a{
    display: block;
    width: 160px; /*width of sub menu levels*/
    color: navy;
    text-decoration: none;
    padding: 1px 5px;
    border: 1px solid #ccc;
    .suckertreemenu ul li a:hover{
    background-color: black;
    color: white;
    /*Background image for top level menu list links */
    .suckertreemenu .mainfoldericon{
    background: #F3F3F3 url(media/arrow-down.gif) no-repeat center right;
    /*Background image for subsequent level menu list links */
    .suckertreemenu .subfoldericon{
    background: #F3F3F3 url(media/arrow-right.gif) no-repeat center right;
    * html p#iepara{ /*For a paragraph (if any) that immediately follows suckertree menu, add 1em top spacing between the two in IE*/
    padding-top: 1em;
    /* Holly Hack for IE \*/
    * html .suckertreemenu ul li { float: left; height: 1%; }
    * html .suckertreemenu ul li a { height: 1%; }
    /* End */
    <script type="text/javascript">
    //SuckerTree Horizontal Menu (Sept 14th, 06)
    //By Dynamic Drive:
    var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas
    function buildsubmenus_horizontal(){
    for (var i=0; i<menuids.length; i++){
      var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
        for (var t=0; t<ultags.length; t++){
    		if (ultags[t][i]){ //if this is a first level submenu
    			ultags[t][t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
    		else{ //else if this is a sub level menu (ul)
    		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    if (window.addEventListener)
    window.addEventListener("load", buildsubmenus_horizontal, false)
    else if (window.attachEvent)
    window.attachEvent("onload", buildsubmenus_horizontal)
    <div class="suckertreemenu">
    <ul id="treemenu1">
    <li><a href="" style="border-left: 1px solid black">Home</a></li>
    <li><a href="">Calendar</a></li>
    <li><a href="">About Us</a>
    <li><a href="">Academic Performance</a></li>  
    <li><a href="">Bell Schedule</a></li>
      <li><a href="">Location</a></li>
      <li><a href="">Mission Statement</a></li>
      <li><a href="">Policies & Procedures</a></li>
      <li><a href="">Principal's Message</a></li>
        <li><a href="">Teacher Directory</a></li>  
      <li><a href="">School Profile</a></li>
      <li><a href="">Staff Directory</a></li>    
    <li><a href="">Programs</a>
      <li><a href="">Accelerated Reader</a></li>
     <li><a href="">Arts Prototype</a></li>
      <li><a href="">Beyond the Bell</a></li>  
      <li><a href="">GATE Program</a></li>
      <li><a href="">NASA School</a></li>
      <li><a href="">Nestle Gardens</a></li>
      <li><a href="">Recycle Club</a></li>
      <li><a href="">Student Council</a></li>
    <li><a href="">Parents</a>
      <li><a href="">PTA</a></li>
      <li><a href="">Nestle Councils</a></li>
    <li><a href="">Students</a></li>
    <li><a href="">Library</a></li>
    <li><a href="">Cafeteria</a></li>
    <br style="clear: left;" />
    <p id="iepara"></p>

  2. #2
    Join Date
    Feb 2009
    Thanked 36 Times in 36 Posts


    That's IE for you...

    Not to give you any more problems, but the menu's too big in Firefox, on Linux (See attached).

    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration


Posting Permissions

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