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

Border Control. Can this be done?


Poster: Maso
Dated: Monday July 21 2008 - 19:55:50 BST

I'm using the plain text vertical menu (style changed completely). What I want to know is: Is it possible to apply a 1 pixel border to the submenu but -not- to the main menu (in a CSS list menu this would be the li stylings and not the ul - if you get what I mean.)

If this is possible, how would it be achieved? I read the page under Support on 'borders' but it does not cover applying a border to one level and not the other.

Many thanks,
C.

Re: Border Control. Can this be done?


Poster: John
Dated: Monday July 21 2008 - 20:18:05 BST

Try http://support.milonic.com/beginners/borders.htm for some ideas.

Let us know if you need more help.

Re: Border Control. Can this be done?


Poster: Maso
Dated: Monday July 21 2008 - 20:40:35 BST

Hi,

As I stated I have already read that page. It's good for everything but seperating the main menu and submenu borders. I don't want a border on the main menu, but I do on the submenu.

Re: Border Control. Can this be done?


Poster: John
Dated: Monday July 21 2008 - 21:17:20 BST

Sorry 'bout that. It's been a bad week already.

In your styles for the submenus you can apply the following...
Code:
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;

Adjust as needed, of course.

HTH.

Re: Border Control. Can this be done?


Poster: Maso
Dated: Monday July 21 2008 - 21:25:55 BST

Hi,

I don't know how to apply styles to the submenu. I have been altering the menu_data.js file to style the menu - but this only has one set of style 'options' which seem to apply to both the main menu and submenu.

Sorry for being a pain. :oops:

Re: Border Control. Can this be done?


Poster: John
Dated: Monday July 21 2008 - 21:43:01 BST

Not to worry. You're not a pain, just new at this - and we all started there sometime or another.

You can apply as many styles to your menu system as you need. The only gotcha is, obviously, each must have a unique name; e.g.,
Code:
with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="../../arrow.gif";
subimagepadding=2;
}

with(menuStyle2=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";
fontsize="14px";
fontstyle="normal";
offbgcolor="darkblue";
offcolor="yellow";
onbgcolor="#ffffff";
oncolor="#ff0000";
padding="6px"
}


Two different styles, one 'menuStyle' and the other 'menuStyle2' by name. Adjust as needed for the desired effect, call one for your main menu and the other for your subs.

Re: Border Control. Can this be done?


Poster: Ruth
Dated: Tuesday July 22 2008 - 1:26:58 BST

To add to what John has said, if you want the style to be the same for both main and subs but want the border in the subs you can use the 'copyOf' method

Code:
menuStyle2=new copyOf(menuStyle);
menuStyle2.bordercolor="whatever color";
menuStyle2.borderwidth=1;
menuStyle2.borderstyle="whatever style";


As a beginner it's easier to use the full styles so you become used to creating and applying them, but as you get more comfortable in styling, you can use the above method when you are only making a few changes between menu styles.

Also, take a look at the links below my name, there is a forum posted with some info for beginners.

Ruth

Re: Border Control. Can this be done?


Poster: John
Dated: Tuesday July 22 2008 - 15:22:43 BST

Ruth's suggestion about the Beginner area is a good one. From the sound of things you're jumping right into the middle of things here, which sometimes can be good. However, with all the capabilities of this system you really need to do some reading.

NOTE! I am in no way suggesting you can't make it work by just digging around, nor that you aren't a capable person, but I think you'll find a more rewarding experience, and quicker startup, by checking out the links in her sig lines. :D