Switching to CSS

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
matio
Beginner
Beginner
Posts: 3
Joined: Tue Sep 14, 2004 3:12 pm

Switching to CSS

Post by matio »

Hi Milonic team,

I have searched your forum on how to completly switch the menu and submenu properties to use CSS, but I only found misc. stuff here and there.

I believe that it would be of common interest to know which would be the best way to completly switch the layout of the menu to CSS. Juding from your extensive browser support I'd expect that old (!) browser will have problems, but most of the new browsers should be able to handle CSS properly.

Here are some questions I'D love to see answered:

What are the names of teh classes you use for: <div /> and <a /> tags ?
Which style/menu/submenu properties do they replace ?
Which style/menu/submenu properties are mandatory at all ?

A simple exmaple would be great !!!

Regards,

Matthias
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

You might try checking the quick reference guides, there is one for style properties, menu properties, item properties. You can find them in the links below my signature. I've never seen any kind of property to 'code a div' in the menu and am not sure what you mean by what are the class names for divs? I'm not really sure what it is you want to do, but if you are trying to code the properties in a style sheet, you can create your own class for the mouseOff properties and one for the mouseOn properties and then use the offclass= and onclass= parameters within the menu. Example: assume you have created a class called menuOff in your css style sheet

Code: Select all

.menuOff {offbgcolor:#ffffff;fontstyle:normal;fontweight:bold;fontfamily:verdana,arial;border: 1px solid #ffff00;}
Having created this class putting anything you want defined for the menu when the mouse is in the off position, you would eliminate those things from the menu_data.js style definition where you want to use the class and substitute offclass="menuOff";

The various parameters of the menu are listed in those property references so you can see what you can code.

Ruth
matio
Beginner
Beginner
Posts: 3
Joined: Tue Sep 14, 2004 3:12 pm

Post by matio »

Hi Ruth,

thanks to your quick response. Well, let me further explain what I mean. If I take a look at the dynamically generated HTML by your javascript copding I see for example that by default all <div> tags that you generate are of class "mmenu". What you describe below works indeed:
if I specify the onclass and offclass attributes the deafult class "mmenu" is switched dynamically.

Well, the <div> is only the container and the link of th menu is "of course" a <a> tag. You name them mlink0 to mlink[i]n[/i]...

From the code I posted below I assume you parse the content of the style, because offbgcolor and fontweight are [b]NO[/b] valid css properties... now in this case I have no valid css document anymore.

If the style/menu/submenu properties do not match 1:1 to css properties what are the correct substitutes: e.g. I tried setting the width of a menu
by using the css properties "display: block; width: 125px", but that does not seem to work in Firefox 0.9 at all...

Please take a closer look at my issue again.

Thanks in advance,

High regards,

Matio
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm sorry, I am only a volunteer who knows nothing about programming. We are all volunteers though the others probably know something about what you are presenting. As you see I thought you were talking about creating on/off class for the menu. It seems what you're asking is how the menu is programmed. I think...maybe :lol: Shows you what I know :?
If you own a license, I would suggest you contact Milonic about this issue since it has to do with the actual menu program :)

Ruth
matio
Beginner
Beginner
Posts: 3
Joined: Tue Sep 14, 2004 3:12 pm

Post by matio »

Hi Ruth,

yes, I do own a license and I'll contact the service team on this behalf. I'll update this thread once I get an anwser.

Regards,

Matthias
Post Reply