Does each menu have an ID?
Does each menu have an ID?
I would like to be able to refernce an entire menu from a CSS style sheet, which would require that the menu have an ID associated with it.
Does anyone know if each menu is written to the HTML page with an ID?
(The style sheet would refer to the menu as #menuname)
Thanks!
Does anyone know if each menu is written to the HTML page with an ID?
(The style sheet would refer to the menu as #menuname)
Thanks!
I'm not sure I understand what you mean by reference an entire menu from a style sheet. Do you mean you want to design all the style of the menu, i.e. color, borders, margins etc, in css? There is information here about css menus. Hope this helps.
Ruth
Ruth
I mean the ability to refernce a menu by ID name in a CSS style sheet.
I can refer to every menu on the page by addressing the .mmenu class name in the CSS file, but I wanted to know if I can address a specific menu by referencing #menuname.
I can't think of any way to be more specific. Do you know the answer?
I can refer to every menu on the page by addressing the .mmenu class name in the CSS file, but I wanted to know if I can address a specific menu by referencing #menuname.
I can't think of any way to be more specific. Do you know the answer?
As far as I know menus are identified by name. There may be some internal programming that does something else, but that is not something I would know.
The only way I know to put a different css style on a particular menu would be to create .difOff and .difOn classes [named what you want] in the css file and then call them in the style definition that you had created in the menu_data.js file for that particular menu.
Sorry, but my use of css is pretty basic and if there's some other way to apply it to the menu other than the offclass and onclass, I haven't seen it described.
I get the impression you want the browser to read the style sheet, say 'here's a style for this menu in the Milonic DHTML Menu system so apply this style to that particular menu. But, I think you have to create classes in the style sheet and apply them using the offclass and onclass in the menu_data.js file style defintions, then they get applied to the menu from that offclass onclass menu function. Perhaps someone else knows a different way.
Ruth
The only way I know to put a different css style on a particular menu would be to create .difOff and .difOn classes [named what you want] in the css file and then call them in the style definition that you had created in the menu_data.js file for that particular menu.
Sorry, but my use of css is pretty basic and if there's some other way to apply it to the menu other than the offclass and onclass, I haven't seen it described.
I get the impression you want the browser to read the style sheet, say 'here's a style for this menu in the Milonic DHTML Menu system so apply this style to that particular menu. But, I think you have to create classes in the style sheet and apply them using the offclass and onclass in the menu_data.js file style defintions, then they get applied to the menu from that offclass onclass menu function. Perhaps someone else knows a different way.
Ruth
Ruth,
Thanks for your thoughtful reply. You are close on what my intentions are, but let me be more precise:
I have added a style to the style sheet which makes the menu disappear on printouts. To do this right now, I have added the following code to my stylesheet:
Although this code does a great job of eliminating the menu during printouts, it essentially removes all milonic menus from the page, because it hides everything with a class of mmenu.
If each menu had a unique id attribute, instead of I would write
Is there anyone who knows the JavaScript internals who would know if each menu gets assigned an id attribute? (Andy?)
Much appreciated!
Thanks for your thoughtful reply. You are close on what my intentions are, but let me be more precise:
I have added a style to the style sheet which makes the menu disappear on printouts. To do this right now, I have added the following code to my stylesheet:
Code: Select all
@media print{
.mmenu {
display : none;
}
}
If each menu had a unique id attribute, instead of
Code: Select all
.mmenu {
Code: Select all
#menuid {
Much appreciated!