0

Im using dreamweaver and it's my first time to use it and I can't find the code to change the subitems menu color and how to change background when hovered on the dropdown.

*{
        margin:0;
        padding:0;
    }
    ul.MenuBarHorizontal
    {
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        background:url(../images/menu5.png) no-repeat;
        width:420px;
        height:58px;
    }
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    {
        z-index: 1000;
    }
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    {
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        cursor: pointer;
        float: left;
    }

    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    {
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        position: absolute;
        left: -1000em;
    }
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    {
        left: auto;
    }
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    {
        width: 6.2em;
    }
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    {
        position: absolute;
        margin: -5% 0 0 95%;
    }
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    {
        left: auto;
        top: 0;
    }

    /*******************************************************************************

     DESIGN INFORMATION: describes color scheme, borders, fonts

     *******************************************************************************/

    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    {
        background-color:#00b1ef;
        padding-top: 2px;
        padding-right: 0px;
        padding-bottom: 2px;
        padding-left: 0px;
        margin:0;
    }
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal li a
    {
        display: block;
        color: gray;
        text-decoration: none;
        font-family:verdana;
        font-size:8px;
    }
    ul.subItem li a.subHover {
        font-color:#fff;
    }
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    {
        background:url(../images/hover.jpg) no-repeat;
        /**color: #FFF;**/
    }

    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    {
        background:url(../images/hover.jpg) no-repeat;
        color: #FFF;
    }

    /*******************************************************************************

     SUBMENU INDICATION: styles if there is a submenu under a given menu item

     *******************************************************************************/

    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    {
        background-repeat: no-repeat;
        background-position: 95% 50%;
    }
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    {
        background-repeat: no-repeat;
        background-position: 95% 50%;
    }
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    {
        background-repeat: no-repeat;
        background-position: 95% 50%;
    }
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    {
        background-repeat: no-repeat;
        background-position: 95% 50%;
    }

    ul.MenuBarHorizontal iframe
    {
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    }

    #MenuBar1 li ul li a.subHover {
        font-size:9px;
        padding-top: 5px;
        padding-right: 3px;
        padding-bottom: 5px;
        padding-left: 3px;
        font-color:#fff;
    }
    #MenuBar1 li ul li a.subHover:hover {
        background-color:yellow;
    }
    #MenuBar1 li a {
        text-decoration: none;
        text-align: center;
        vertical-align: middle;
        list-style-type: none;
    }

I also tried creating new rules for it but doesn't work. I'd appreciate your help :)

4
  • Create a JSFiddle and I will help you
    – Ali Gajani
    Aug 13, 2013 at 2:22
  • @AliGajani, I created a jsfiddle but the dropdown is not showing.. Here is the link
    – abc123
    Aug 13, 2013 at 2:33
  • In dreamweaver, it's working properly with the dropdown.
    – abc123
    Aug 13, 2013 at 2:33
  • If it does work within Dreamweaver, are you sure you've copied all the Javascript and all the CSS over?
    – Mr Lister
    Aug 13, 2013 at 8:01

1 Answer 1

0

Just from taking a quick look at your css and html it seems like the hover effect from the sub-items is set in the following CSS-rules

#MenuBar1 li ul li a.subHover:hover {
   background-color: #FF0;
}

and

ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus {
   background: url(http://www.comgtech.com/images/hover.jpg) no-repeat;
}

The background-color without hover is set in the rule for the UL

ul.MenuBarHorizontal ul {
   background-color: #79B1C5;
   padding-top: 2px;
   padding-right: 0px;
   padding-bottom: 2px;
   padding-left: 0px;
   margin: 0;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.