Why is my menu messed up in Opera but OK in IE

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Why is my menu messed up in Opera but OK in IE

    I followed a CSS menu tutorial at
    [url]http://www.interspire.com/content/articles/10/1/Building-An-Expanding-DHTML-Menu[/url]
    -With-CSS-and-JavaScript. I've made some adjustments so the appearance fits
    better with my site and in IE it looks as it should, ie the menu items that I
    want to expand to show a sub-menu do this and the hover background colour works.

    However, in Opera the whole thing is completely messed up. It's as if it's
    ignoring the menu altogether because it's displaying the items that come after
    the menu on top of it! Not only that but if you click a menu item it shows the
    sub-menu for just a split second then it disappears.

    Here's a test page I've put up: [url]http://www.leevalleylions.co.uk/test.php[/url]

    I can't get the hover "rollover" effect unless I wrap the menu in a div (div
    class="menu1">). If I remove the div from around the menu then the layout in
    IE and Opera is fine, but the menu links just show as normal page links and the
    sub-menus still won't display in Opera. The test page has the div, so does
    show the rollovers. Here's the menu HTML (with the enclosing div):

    <div class="menu1">
    <a href="../index.php" class="menu1">Home Page</a>
    <a href="#" class="menu1" onclick="showHide('mymenu2')">Fixtures &amp;
    Results</a>
    <div id="mymenu2" class="hide">
    <a href="../results/index.php" class="submenu">2006/07 Season</a>
    <a href="../results/season0506/index.php" class="submenu">2005/06
    Season</a>
    </div>
    <a href="../photos/index.php" class="menu1">Photos</a>
    <a href="#" class="menu1" onclick="showHide('mymenu4')">Player Info</a>
    <div id="mymenu4" class="hide">
    <a href="../players/index.php" class="submenu">Players 2006/07</a>
    <a href="../players/2005-06.php" class="submenu">Players 2005/06</a>
    </div>
    <a href="#" class="menu1" onclick="showHide('mymenu5')">Lions in Print</a>
    <div id="mymenu5" class="hide">
    <a href="../print/index.php" class="submenu">Link One here</a>
    <a href="../print/2005-06.php" class="submenu">Link Two here</a>
    </div>
    <a href="../nostalgia/index.php" class="menu1">Team History</a>
    <a href="../sponsorship.php" class="menu1">Sponsorship</a>
    <a href="../merchandise/index.php" class="menu1">Merchandise</a>
    <a href="../downloads/index.php" class="menu1">Downloads</a>
    <a href="../forum/index.php" class="menu1">Forum</a>
    <a href="../guestbook/index.php" class="menu1">Guestbook</a>
    <a href="../contact/contact.php" class="menu1">Contact Us</a>
    <a href="http://www.leevalleylions.org.uk" target="_blank"
    class="menu1">Junior Lions</a></div>

    Here is the relevant CSS:

    /*LEFT CELL*/
    .leftcell {
    width: 180px;
    height:450px;
    border-right:1px solid black;
    vertical-align:top;
    padding-top:10px;
    background: #ffffff;
    font-size: 11px;
    margin-left: 7px;
    margin-top:0px;
    margin-bottom:0px;
    font-weight:normal;
    }

    .leftcell p {
    padding-left:5px;
    }
    #menuphoto {
    background-image:url(../images/newlions/background-vas.jpg);
    background-repeat:no-repeat;
    }
    /*MENU*/

    .menu1{
    padding-left:5px;
    padding-right:5px;
    padding-top:0px;
    padding-bottom: 0px;
    display:block;
    text-decoration: none;
    color: #000000;
    height: 15px;
    font-size:13px;
    font-weight:bold;
    }

    .menu1 a:link, .menu1 a:visited {
    text-decoration:none;
    }
    .menu1 a:hover, .menu1 a:active {
    color:#FFFFFF;
    background-color:#1ca962;
    }

    .submenu{
    display: block;
    height: 15px;
    margin-left: 10px;
    padding-left: 7px;
    color: #333333;
    font-size:11px;
    font-weight:normal;
    }

    .hide{
    display: none;
    }

    .show{
    display: block;
    }

    .leftheading {
    padding-bottom:3px;
    border-bottom:1px solid black;
    padding-left:5px;
    }

    I've tried everything I can think of but nothing I try will make the menu
    appear as it should in Opera. I'd be really grateful if someone could tell me
    where I'm going wrong - many thanks.



    Julianne Guest

  2. Similar Questions and Discussions

    1. Hyperlinks gets messed up
      I am having this same problem with relative links in buttons using Acrobat 6.01. When clicking on a button with the action, "Open a web link,"...
    2. Color is really messed up..
      When i use the air brush or dodge, the highlight or darkened area leaves rings, here's an example of what its doing, please help me ...
    3. what have i messed up now?
      every time i use the marquee tool,oval or square it jumps back to the same size round circle.its making me crazier than i am.
    4. forums are messed up?
      middletree: I can see all your posts asking for this site check. It's likely that you are not grabbing enough headers with your newsreader to...
    5. apt-get; all messed up by update...
      I have a Woody system that has been running for over a year now without much change, and I just tried to do an apt-update, and then apt-upgrade,...
  3. #2

    Default Re: Why is my menu messed up in Opera but OK in IE

    Hi Julianne,

    I'm not sure this will be the answer, but have you tried assigning a "a-index"
    to a div tag that would "enclose" your menu?

    Esentially this would make the content of that tag "float" above other div
    tags with a lower z-index value.

    I don't remember the rules for Opera and the use of div tags, but it would be
    easy to try.

    TPK

    TPK Guest

  4. #3

    Default Re: Why is my menu messed up in Opera but OK in IE

    Pardon me but I fat fingered the div tag. I meant to say "z-index" rather than
    "a-index".

    Also, since you are using a style tag I'm not sure you would want
    position:absolute, which will float the div layer around or position:relative
    which fixes the position relative to other elements.

    TPK

    TPK Guest

  5. #4

    Default Re: Why is my menu messed up in Opera but OK in IE

    Thanks for your answers. I did a bit of experimenting and I can only think
    that Opera didn't like me using the class in the div and then again in the
    menu. I created a new class just for the link rollover effects, put the menu
    inside a div with that class and it worked just fine.

    Julianne Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139