Border Control. Can this be done?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Maso
Beginner
Beginner
Posts: 4
Joined: Mon Jul 21, 2008 7:47 pm

Border Control. Can this be done?

Post by Maso »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Border Control. Can this be done?

Post by John »

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

Let us know if you need more help.
John
Maso
Beginner
Beginner
Posts: 4
Joined: Mon Jul 21, 2008 7:47 pm

Re: Border Control. Can this be done?

Post by Maso »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Border Control. Can this be done?

Post by John »

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

In your styles for the submenus you can apply the following...

Code: Select all

bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
Adjust as needed, of course.

HTH.
John
Maso
Beginner
Beginner
Posts: 4
Joined: Mon Jul 21, 2008 7:47 pm

Re: Border Control. Can this be done?

Post by Maso »

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:
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Border Control. Can this be done?

Post by John »

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: Select all

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.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Border Control. Can this be done?

Post by Ruth »

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: Select all

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Border Control. Can this be done?

Post by John »

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
John
Post Reply