Spry menus won't display image rollovers

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Spry menus won't display image rollovers

    I have a menu that requires a different image for each top-level menu item but,
    no matter what I do, I'm unable to get my image backgrounds to switch to
    rollover states on hover/mouseover.

    I set up IDs for each of the main menu items and used these to assign a
    different b/g image to each top [LI] tag (the submenus are just CSS color and
    work correctly). I don't need the submenu arrow indicator so I removed those
    properties. I've been referring to the instructions, experimenting with
    endless variations, and searching various forums but I just can't get the
    rollover effect to work.

    A sampling of my CSS attempts follows (I'm sorry -- I couldn't get it to
    insert with "Attach Code"). Can someone please let me know what I'm doing
    wrong or if there's another rule(s) I still need to modify or create? I'm all
    out of ideas and am very desperate for a solution now. Thank you....

    Vera

    /* Top level menu item -- normal state images: THIS WORKS */
    ul.MenuBarVertical #home {
    background-image: url(../images/MENU/norm_home.jpg);
    }
    ul.MenuBarVertical #about {
    background-image: url(../images/MENU/norm_about.jpg);
    }
    etc...
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    /* Top level menu item -- hover state images: THIS HAS NO EFFECT */
    ul.MenuBarVertical a:hover #home {
    background-image: url(../images/MENU/cur_home.jpg);
    }
    ul.MenuBarVertical a:hover #about {
    background-image: url(../images/MENU/cur_about.jpg);
    }
    etc...
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    I also tried this, with no effect:

    ul.MenuBarVertical a:hover #home, ul.MenuBarVertical a:focus #home {
    background-image: url(../images/MENU/ro_home.jpg);
    }

    ul.MenuBarVertical a:hover #about, ul.MenuBarVertical a:focus #about {
    background-image: url(../images/MENU/ro_about.jpg);
    }



    veramilomilo Guest

  2. Similar Questions and Discussions

    1. spry menus
      My submenus (when you hover) are not showing up on the page. They work correctly here: http://www.valtekinc.com/RevAug08/newmenuonly822.html, but...
    2. Image Rollovers and Image Maps
      Hello. I've (what seems) like a simple problem, I've a 3 stage direction map to create. The first map zoomed image is displayed, click on the...
    3. rollovers for drop down menus
      I have a drop down menu which appears when I roll over a button. The drop down itself is a movieClip inside which are more sub-navigation buttons. ...
    4. Issues with sticky pop-up menus & rollovers
      created my webpage in Fireworks MX and exported it to Dreamweaver MX. I made all the changes to the MM_menus.js and HTML page so that the simple...
    5. How can I combine image maps & rollovers using image ready?
      I already know how to make image maps and rollovers using image ready. But I don't know how to combine them. Please can someone cure me from my...
  3. #2

    Default Re: Spry menus won't display image rollovers

    veramilomilo wrote:
    > /* Top level menu item -- normal state images: THIS WORKS */
    > ul.MenuBarVertical #home {
    > background-image: url(../images/MENU/norm_home.jpg);
    > }
    > /* Top level menu item -- hover state images: THIS HAS NO EFFECT */
    > ul.MenuBarVertical a:hover #home {
    > background-image: url(../images/MENU/cur_home.jpg);
    > }
    For future reference, Spry questions are best asked in the Spry forum:
    [url]http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602[/url]

    If the top selector works and the second one doesn't then it may be due to the location of the a:hover in the second selector. Without seeing a link to a copy of your page (please post links!) it is difficult to determine what the markup up is that you've applied the id of "home" to. Your second selector (the one that doesn't work) means:
    Apply a background image to an element with an id of "home" that is within an a tag in the hover state that is within a UL with a class of MenuBarVertical.

    If I assume that #home is applied to an <a> tag, then the second selector won't work as the #home link *is* the <a> that is getting hovered over. You might be able to use something like:
    ul.MenuBarVertical #home:hover {
    background-image: url(../images/MENU/cur_home.jpg);
    }

    For follow up questions, please post a thread in the Spry group and post a link to your page so that the kind souls that help out can see exactly what the code is for you css as well as for your HTML (and even JavaScript in case there is some sort of conflict involved).

    --
    Danilo Celic
    | [url]http://blog.extensioneering.com/[/url]
    | WebAssist Extensioneer
    | Adobe Community Expert
    danilocelic AdobeCommunityExpert Guest

  4. #3

    Default Re: Spry menus won't display image rollovers

    danilocelic AdobeCommunityExpert wrote:
    > veramilomilo wrote:
    >> /* Top level menu item -- normal state images: THIS WORKS */
    >> ul.MenuBarVertical #home { background-image:
    >> url(../images/MENU/norm_home.jpg); }
    >
    >> /* Top level menu item -- hover state images: THIS HAS NO EFFECT */
    >> ul.MenuBarVertical a:hover #home { background-image:
    >> url(../images/MENU/cur_home.jpg); }
    If you have CSS that is tripping you up, it may be a good idea to run it through SelectORacle to get a "plain English" version of the selector to see if it makes sense for what you are really trying to accomplish:
    [url]http://gallery.theopalgroup.com/selectoracle/[/url]



    --
    Danilo Celic
    | [url]http://blog.extensioneering.com/[/url]
    | WebAssist Extensioneer
    | Adobe Community Expert
    danilocelic AdobeCommunityExpert Guest

  5. #4

    Default Re: Spry menus won't display image rollovers

    Thank you for directing me to the correct forum (I was never able to find the
    Spry forum outside of your link) and for the Selectoracle link which looks like
    it will be very helpful.

    In experimenting, I've messed up something else in my CSS so as soon as I get
    it back to a more usable state and try your other suggestion, I will post a new
    thread to that forum and include a link to the page. (FYI: I assigned #home
    to the [LI] tag, not <a> so that may well be the problem.)

    Thanks again!

    Vera

    veramilomilo 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