different bgcolor for each submenu - possible?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

different bgcolor for each submenu - possible?

Post by donH »

I have one main menu that will have various submenus.
Does anyone know if it is possible to make each submenu have a different bgcolor, or is that a global control (i.e. menu-wide)?
I tried inserting offbgcolor like this:

Code: Select all

with(milonic=new menuname("Milonic")){
style=menuStyle;
menuwidth=168;
menualign="left"
offbgcolor="#cccccc";
aI("image=images/arrow_submenu.gif;overimage=images/arrow_submenu_roll.gif;text=Giving Options;url=/menusample1.php;");
But it seemed to have no effect. The page is at: http://test.hinshawdesign.com/slplf/men ... me_v2.html if anybody has a moment to look.

Thanks,
Don
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

See http://milonic.com/menusample7.php. Lots of good stuff over there.
John
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

different bgcolor for each submenu - possible?

Post by donH »

Thanks John,
OK, so now that I have the background color of the menuitem set to a specific color, how do I get it to fill the entire width of the drop-down "container" which I have given a width to ( menuwidth=168;).
As you will see at http://test.hinshawdesign.com/slplf/men ... me_v2.html
the color only goes as far as the text in the longest menu item!

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

Post by Ruth »

I don't think you want to put bgcolor in one item, but the full submenu, is that correct?
You can actually create a different color for each submenu if that's what you want.
This talks about styles and creating them, making more than one if you want a different
one for each menu. You probably want to scroll down this topic to Part III, though the
whole thing might be a help.
http://milonic.com/forum/viewtopic.php?t=4600

Ruth
Last edited by Ruth on Wed May 18, 2005 5:20 pm, edited 1 time in total.
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

Post by aquaverse »

I was browsing through this thread, but the link you posted above is no longer valid. Can someone help me with this?

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

Post by Ruth »

Hi,

Sorry, I made some changes and reposted that. I didn't think about it changing the post number :oops:

I've corrected that link. It's part II of styling the menu in the Beginners' Guide forum. It's very basic.

Ruth
Post Reply