List based menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
risingsun
Beginner
Beginner
Posts: 6
Joined: Thu Mar 17, 2005 2:20 am

List based menu

Post by risingsun »

I'm looking for examples of people having success with CSS list based menus (3 sub levels) with the Milonic javascript. I've tried going through the information on http://milonic.com/cssbasedmenus.php, but I can't seem to understand the on off classes.

Please help if you can. Thank you,
RS
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi RS,
Here's one for you to test and see what's happening, then you can change and add whatever you want for yours. HERE is a list of 'style properties for the menu. I don't think all are controllable by css, you'll have to experiment. for now.

When you're making a css based menu, think of it like this: the menu can have two 'looks' it can look one way when the mouse is not on it, and different when the mouse is on it. I've created 2 styles for mouseOff, one for the main and one for the subs, and 2 styles for the mouseOn, one for main and one for subs. They are mouseOff, mouseOn for the main menu, and mousOffSub, mouseOnSub for the submenus.

Place this style code in the head of the webpage [you can do a style sheet, but when I'm experimenting I tend to put it in the head.

Code: Select all

<style type="text/css">
	.mouseOff {
	background-color:#CCCCFF; 
	color:#FF6633;
	border: 2px solid #9999FF;
	padding-top:2px;
	padding-right:4px;
	padding-bottom:2px;
	padding-left:4px;
	font-family:Helvetica, Times New Roman, Arial;
	font-size:12px;
	font-style:normal;
	font-weight:bold;
	align: center;
	margin: 4px;
	}
	
	.mouseOn {
	background-color:#33CCCC;
	color:#FFCC00;
	border: 2px solid #6699CC;
	padding-top:2px;
	padding-right:4px;
	padding-bottom:2px;
	padding-left:4px;
	font-family:Helvetica, Times New Roman, Arial;
	font-size:12px;
	font-style:normal;
	font-weight:bold;
	align: center;
	margin: 4px;
	}
	.mouseOffSub {
	background-color:#E3E1CA; 
	color:#FF6633;
	border: 2px dotted #FFCC00;
	padding-top:2px;
	padding-right:4px;
	padding-bottom:2px;
	padding-left:4px;
	font-family:Helvetica, Times New Roman, Arial;
	font-size:11px;
	font-style:normal;
	font-weight:bold;
	align: center;
	margin: 4px;
	}
	.mouseOnSub {
	background-color:#AF9167; 
	color:#FFFFCC;
	border: 2px dashed #9999FF;
	padding-top:2px;
	padding-right:4px;
	padding-bottom:2px;
	padding-left:4px;
	font-family:Helvetica, Times New Roman, Arial;
	font-size:11px;
	font-style:normal;
	font-weight:bold;
	align: center;
	margin: 4px;
	}
	</style>


The menu_data.js file would have this as the menuStyle and the subStyle:

Code: Select all

with(menuStyle=new mm_style()){
offclass="mouseOff";
onclass="mouseOn";
}

with(subStyle=new mm_style()){
offclass="mouseOffSub";
onclass="mouseOnSub";

}
As you can see, I've only put the off and the on class in the menu_data.js style descriptions, but you can put other things with that, like headerbgcolor, pagebgcolor, overfilter etc. You can experiment with the various style properties to see which can be set up in a css class.

Hope that helps.

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Any of the menu downloads now contain a sample listbased menu.

The links are taken from HTML Lists and are then processed through the menu.

There are now also PHP and XML based samples.

Hope this helps
Andy
risingsun
Beginner
Beginner
Posts: 6
Joined: Thu Mar 17, 2005 2:20 am

Post by risingsun »

Thanks Ruth and Andy,

I'll try to test your suggestions and give it a go by next week.

Thanks again,
RS
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Andy wrote:...Any of the menu downloads now contain a sample listbased menu....
Somebody's been busy. List-based menus... a very nice touch Andy.

Kevin
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Yup, loads more stuff coming soon, watch this space - competition is really hotting up in the DHTML arena at the moment.

This is due to browsers like Netscape 4 no longer being supported, Seems that any old fool can write menus these days. They can't write good ones though ;)

Cheers,
Andy
Post Reply