Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:10

a feature request

Poster: Ruth
Dated: Wednesday September 24 2003 - 19:34:01 BST

I've never actually put this in the request section, just tried to get workarounds in the help sections and Hergio really gave me some great help there. But, I thought I might as well put it here and if it seems something useful then at some point if it's feasible, Andy will get to it. Personally, I think it would be a neat ability and make the menu very versatile artistically. Yes, I realize that the artistic is down at the end of the list :P but anyway...... Think how versatile as to look if there were a way of coding in the menu that it should choose both the page font color which would then show as the offcolor, separator color and border color; and the page back ground color which would show up for the offbgcolor for the main background of the menu. That would mean that on any site the person would have a menu that matched on each page the artistic design of that page. :lol: After all I have to believe that web designers..even the techie focused ones also kind of look at the artistic part of the web design....


Poster: Hergio
Dated: Tuesday October 7 2003 - 19:17:14 BST

I mentioned this to Andy, but it may be on the back burner in terms of priority due to the fact that its regarding artistic things and not bugs or tangible features.

I suggested something along the lines of a 'default' style being generated by the menu that would look at your page's properties and if it found any, it would use them in the default style. Then any menus you did not set a style for would use this style. It would require you to specifically set the font colors and background colors in each page, and if it didnt find them, it would use some neutral default colors (milonics colors, hehe). But that way, each page would look like it had its own style of the menu, pulled right from the page.

Oh wait now, I just thought of something, Ruth. The menu has onclass and offclass, right? Well just have each menu item have its onclass and offclass set to the same css style (so its always a certain color or look). Then in each individual page, you set that css style up in the head of your document and that way the menu uses the colors of the style defined in that page! Each page defines the style differently, but the menu always looks for that one style by name and its different on each page.

There ya go, that should take care of it for you, I think. ;) But a default style might not be bad so people can just plug in a menu and not have to define a style if they don't want to.

Poster: Maz
Dated: Tuesday October 7 2003 - 22:46:01 BST

Hi Dave,

I haven't found much about onclass and offclass, could you give a little explanation of how it works?

Can I set up css and tell the menu to use those, I'm thinking that if the menu isn't set up to use certain styles it can't do it?


Poster: Hergio
Dated: Wednesday October 8 2003 - 2:15:55 BST

If you look under the menu items quick reference guide the Milonic Menu home page you will see two functions you can use, onclass and offclass. Basically what these do are take that individual menu item and apply the css class style that you set for it when you mouse over it, our mouse out of it, or both. Setting a style as both on and off class basically removes any state changes to the item when you roll over it.

If in the head of your PAGE you have something like (and yes there is a period before myCSSstyle, that means its a class. When you reference the CSS class later in code, you don't use the period.
      border: 1px red solid;
      font-size:  13px;
      background: #eff2ff;
      font-weight: bold;

You can use this in your menu. Set your onclass to onclass="myCSSstyle" and your offclass="myCSSstyle" and this will make all your item have a border, 13px high, a bluish background and bold font. Set it for all and they all have it. Hope you get it to work in your version of the Milonic DHTML Menu. ;)

Poster: Maz
Dated: Wednesday October 8 2003 - 3:01:16 BST

What do you mean by 'my version' :|

You make it sound as if any css style will work.

Border bottom works! yeah! (but too many layers)


Poster: Ruth
Dated: Wednesday October 8 2003 - 9:39:41 BST

Default style, yes, that's it! And yes, I know it will be way down the list if it does ever get done, after all, what good is artistic ability with the menu if it doesn't funciton??? As, to the onclass in my vocabulary that's something you take in a certain field when you want to get an education.... :lol: I am thoroughly lost, which means my life is normal :!: I've taken your code and am going to play with it and see what happens, since you said what it will look like, I'll know if I get it right. I know I have to read up on css, it's on my list........someplace.... but I will get to it. Thanks for the suggestion.


Poster: Hergio
Dated: Wednesday October 8 2003 - 13:57:45 BST

By 'version' I just meant your copy, your implementation of your menu on your site. Sorry bout that.

Most styles will work. You have to understand how CSS works in that its cascading so you can define a style say, across your entire page so every table has a black border around it. But if you want to make a particular table have the border, but you want it red and you want the background a certain color, you can just define a style inline on the table in the table's tag. This new style would use the parent style as instructed, but would override the color of the border and add to it the background color. Thats where the cascading comes in, because you can do this an infinite number of levels. Thats the beauty of CSS, you can be as broad or as granular as you'd like and its easy to do both.

There is a quirky little thing I found out about the onclass and offclass that I am unsure about, I am putting a post in the development and bugs section.