Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:05
onClass and offClass
Poster: Hergio
Dated: Wednesday October 8 2003 - 15:02:10 BST
Found alittle quirk in the onclass and offclass of the menu items and their relationship to the menu styles, not sure if its supposed to be or not.
I have two CSS styles that look like
Code:
<STYLE>
.myCSSstyle1{ /* red border, light red background */
border: 3px red solid;
background: #ffeaf2;
}
.myCSSstyle2{ /*blue border, light blue background */
border: 3px blue solid;
background: #eaf2ff;
}
</STYLE>
.myCSSstyle1{ /* red border, light red background */
border: 3px red solid;
background: #ffeaf2;
}
.myCSSstyle2{ /*blue border, light blue background */
border: 3px blue solid;
background: #eaf2ff;
}
</STYLE>
And in the my MENU STYLE, if I leave on/off background blank and onborder all blank too, the CSS STYLEs come through great on the menu item when a menu item has onClass=myCSSstyle1;offClass=myCSSstyle2. Wonderful.
Setting my on/off background colors in the MENU STYLE to a color overrides the onClass and offClass background, but the borders stay. This makes sense since the border makes it through, and the color gets added. But is the menu style property supposed to override menuitem on and off class definitions? I would think since you are defining them in the menu item they should take precedence over any global definitions. If I defined on and off class in the item, I would expect the rest of the menu to behave as the menu style says, but this one item would have different background colors since I put in the classes for it to use, right?
Also, if I specify the above classes and then set the onborder attribute of the MENU STYLE, when the menu loads the menu items have the style of the offclass style as expected. When I mouseover the item, I don't get the border of the onclass CSS style, I get the border of the onborder MENU STYLE, and I guess this is ok, you have to pick one to use, right? But when I mouse out of the item, I don't get the offclass style anymore, it seems to get wiped. Any of this by design?
Poster: Maz
Dated: Wednesday October 8 2003 - 15:15:53 BST
Did you try it with transparent?
I tried it with border-bottom, although amazed it could take something not in the menu itself, the result was 2 border-bottom, one for the subimage.
Regards,
maz
Poster: Hergio
Dated: Wednesday October 8 2003 - 15:44:05 BST
Its not a matter of I can't get something to work. Its just that I'd like to know what takes precedance, which styles should override others. And with the onborder thing, I would think offclass should restore itself as long as offborder is not specified, but it doesn't. And even then, if you do specify offborder in the style, shouldnt the offclass for the individual item override the offborder directive since its actually IN the item definition.
Poster: Maz
Dated: Friday October 10 2003 - 16:59:27 BST
I assumed above, that I got 2 css bottom borders due to subimage, wrong again.
It didn't sit right with me the way it rendered, reading new posts, now I realize that this must also be created by 3D effect.
3D is ever present, even though I don't use borders or 3D on the top main menu. When I created a css bottom-border to the item it created the bottom border on the main item and a 2nd bottom-border to 3D.
Now its making sense.
maz