padding="0px 5px 0px 15px" and subimage don't work

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
TallerMike
Beginner
Beginner
Posts: 4
Joined: Fri Feb 13, 2004 2:32 am

padding="0px 5px 0px 15px" and subimage don't work

Post by TallerMike »

I have set the padding of the submenu items as follows:

padding="0px 5px 0px 15px"

When I turn on the subimage, every menu item that doesn't have any sub menus (IE, doesn't show the subimage) looks fine. However, all items that DO show the subimage ignore the padding setup above. If I change the padding declaration to the following, it seems to work however:

padding=2;

But I don't want a padding of 2 all around. I need different paddings on all sides pretty much. Below is the code I am using:

Code: Select all

_menuCloseDelay=500;
_menuOpenDelay=0;
_scrollAmount=3;
_scrollDelay=20;
_followSpeed=5;
_followRate=40;
_subOffsetTop=3;
_subOffsetLeft=-3;

with(mainMenu=new mm_style())
	{
	offcolor="#663300";
	offbgcolor="#FFCC99";
	oncolor="#663300";
	onbgcolor="#F4F4DF";
	bordercolor="#000000";
	borderstyle="solid";
	borderwidth=1;
	fontsize=10;
	fontstyle="normal";
	fontweight="bold";
	fontfamily="Verdana, Arial, Helvetica, sans-serif";
	padding="2px 5px 2px 5px";
	subimage="/inc/js/DHTMLMenu/arrow.gif";
	separatorpadding=0;
	pagecolor="#000000";
	pagebgcolor="#F4F4DF";
	headercolor="#ffffff";
	headerbgcolor="#000099";
	separatorcolor="#000000";
	separatorsize=1;
	overfilter="Fade(duration=0.2);Alpha(style=0,opacity=100);";
	}

// Sub Menus Style
with(subMenu=new copyOf(mainMenu))
	{
	padding="0px 5px 0px 15px";
	offcolor="#000000";
	oncolor="#000000";
	fontsize=9;
	separatorsize=0;
	fontweight="normal";
	}


	with(milonic=new menuname("subMenu_24"))
		{
		style=subMenu;
		aI("text=Field Reps;url=/clientsvcs/fieldrep/field_rep_maint_fs.cfm;target=_top;status=Field Reps;")
		aI("text=Field Rep pref/ban;url=/clientsvcs/fieldrep/field_rep_settings_fs.cfm;target=_top;status=Field Rep pref/ban;")
		aI("text=Subcontractor;url=/clientsvcs/admin/ContractorCompany_list.cfm;target=_top;status=Subcontractor;")
		aI("text=Activity Descriptions;url=/clientsvcs/admin/activity_desc.cfm;target=_top;status=Activity Descriptions;")
		}

	with(milonic=new menuname("subMenu_25"))
		{
		style=subMenu;
		aI("text=List/Edit Projects;url=/clientsvcs/project/project_list_fs.cfm;target=_top;status=List/Edit Projects;")
		aI("text=Approve Surveys;url=/clientsvcs/survey/survey_edit_list_fs.cfm;target=_top;status=Approve Surveys;")
		aI("text=Survey Tool;showmenu=subMenu_36;status=Survey Tool;")
		aI("text=Scheduling;url=/clientsvcs/project/scheduling/assign_field_reps_fs.cfm;target=_top;status=Scheduling;")
		}

	with(milonic=new menuname("subMenu_26"))
		{
		style=subMenu;
		aI("text=Security;showmenu=subMenu_43;status=Security;")
		aI("text=Reports;showmenu=subMenu_44;status=Reports;")
		aI("text=Data Import;url=/clientsvcs/admin/import_data.cfm;target=_top;status=Data Import;")
		aI("text=Bulletin Edit;url=/clientsvcs/admin/bulletin/bulletin.cfm;target=_top;status=Bulletin Edit;")
		aI("text=System;url=/admin/admin.cfm;target=_top;status=System;")
		}

	with(milonic=new menuname("subMenu_27"))
		{
		style=subMenu;
		aI("text=Standard Reports;url=/reporting/index.cfm;target=_top;status=Standard Reports;")
		}

	with(milonic=new menuname("subMenu_28"))
		{
		style=subMenu;
		aI("text=Help Index;url=/clientsvcs/help/help.cfm;target=_top;status=Help Index;")
		aI("text=About;url=/clientsvcs/about/about.cfm;target=_top;status=About;")
		}

	with(milonic=new menuname("subMenu_36"))
		{
		style=subMenu;
		aI("text=Surveys;showmenu=subMenu_37;status=Surveys;")
		aI("text=Sections;showmenu=subMenu_38;status=Sections;")
		}

	with(milonic=new menuname("subMenu_37"))
		{
		style=subMenu;
		aI("text=New Survey;url=/clientsvcs/survey_tool/survey_create.cfm;target=_top;status=New Survey;")
		aI("text=Edit Survey;url=/clientsvcs/survey_tool/survey_list_fs.cfm;target=_top;status=Edit Survey;")
		}

	with(milonic=new menuname("subMenu_38"))
		{
		style=subMenu;
		aI("text=New Section;url=/clientsvcs/survey_tool/section_create.cfm;target=_top;status=New Section;")
		aI("text=Edit Section;url=/clientsvcs/survey_tool/section_list_fs.cfm;target=_top;status=Edit Section;")
		}

	with(milonic=new menuname("subMenu_43"))
		{
		style=subMenu;
		aI("text=Users;url=/clientsvcs/admin/users_fs.cfm;target=_top;status=Users;")
		aI("text=Modules;url=/clientsvcs/admin/module_list.cfm;target=_top;status=Modules;")
		aI("text=Security Levels;url=/clientsvcs/admin/securityLevel_list.cfm;target=_top;status=Security Levels;")
		aI("text=Views;url=/clientsvcs/admin/view_list.cfm;target=_top;status=Views;")
		}

	with(milonic=new menuname("subMenu_44"))
		{
		style=subMenu;
		aI("text=Calendar;url=/clientsvcs/admin/calendar_list.cfm;target=_top;status=Calendar;")
		aI("text=Access;url=/clientsvcs/admin/report_management.cfm;target=_top;status=Access;")
		aI("text=Clear Cache;url=/clientsvcs/admin/clearReportCache.cfm;target=_top;status=Clear Cache;")
		aI("text=Rescore Surveys;url=/clientsvcs/admin/score_surveys.cfm;target=_top;status=Rescore Surveys;")
		}

	with(milonic=new menuname("subMenu_62"))
		{
		style=subMenu;
		aI("text=Debit Card Reversal;url=/clientsvcs/debit_cards/debit_reverse_main_fs.cfm;target=_top;status=Debit Card Reversal;")
		}
And then this in the body since it is within a table

Code: Select all

						      <script>
						         with(milonic=new menuname("ssmMainMenu")){
							         style=mainMenu;
							         alwaysvisible=1;
							         orientation="horizontal";
							         position="relative";
							   								
										aI("text=Home;url=/clientsvcs/index.cfm;target=_top;status=Home;")
										aI("text=Edit;showmenu=subMenu_24;status=Edit;")
										aI("text=Projects;showmenu=subMenu_25;status=Projects;")
										aI("text=Admin;showmenu=subMenu_26;status=Admin;")
										aI("text=Reporting;showmenu=subMenu_27;status=Reporting;")
										aI("text=Help;showmenu=subMenu_28;url=/clientsvcs/help/help.cfm;target=_top;status=Help;")
										aI("text=Logout;url=/logout.cfm;target=_top;status=Logout;")
							         }
						         drawMenus();
						      </script>
Any thoughts? I think I may have had this problem in Version 3 as well, and my end solution was to set the padding the same all around, and then put spaces infront and behind the text to pad it to the desired amount. I'd rather not do this if I don't need to.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Have you tried using subimagepadding?
TallerMike
Beginner
Beginner
Posts: 4
Joined: Fri Feb 13, 2004 2:32 am

Post by TallerMike »

Yes, I've tried using the subimage padding. What it does is puts padding around only the subimage itself. It does nothing for the padding around the item. So while the rest of my items are padded a number of pixels from the left, items with subimages are not padded at all.
TallerMike
Beginner
Beginner
Posts: 4
Joined: Fri Feb 13, 2004 2:32 am

Post by TallerMike »

From the following post:

http://milonic.com/forum/viewtopic.php?t=4104

I've learned that adding the following code will fix the problem, but it doesn't seem very clean to me:

Code: Select all

rawcss="padding:10px 20px 30px 40px;"
Post Reply