Menu spacing

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ess14
Beginner
Beginner
Posts: 2
Joined: Mon Feb 13, 2006 8:19 am

Menu spacing

Post by ess14 »

Im using images for my main menu... i cant seem to remove the space between them tho? I want the images to be right next to eachother, no space. why is milonic creating like a padding between them? any way to get rid of it?

thanks
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

difficult to say, if you do not provide a url.
Maybe this helps:

Set the itemwidth to width of images.
Of course: no separators, no padding, no margin...


Michael
ess14
Beginner
Beginner
Posts: 2
Joined: Mon Feb 13, 2006 8:19 am

Post by ess14 »

Arghh, pulling my hair out.
I have uploaded the site to: http://www.inductionforce.com/dhtml/
as you can see the main menu has spacing in it. i want the images to butt up agnst eachother.
i have used "text=<img src " and "image = image" to make the menu. basically trying everything i can think of. 0 margin, 0 seperator , 0 padding.
arghh, please help.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

In your menu_data.js file you have subimage="/menuimages/arrow.gif"; and subimagepadding=2; First, there is no subimage that I can find, I get a little x indicating that image isn't there. Second, if you have a subimage and an image, the subimage can't sit 'on top' of the image so there will be space between your images, the space the subimage takes up. To fix it, either mark out the subimage call //subimage="/menuimages/arrow.gif"; or take it out totally and the subimage padding. If you still see any space, try using rawcss="padding=2px 0px 2px 0px"; in the menuStyle. the reason for the top and bottom is because you're using that style in all your menus and the submenus, unless you want the items on top of each other with no space, need to have the padding.

One last thing, the menu does not play well with divs in all browsers, that is due to how the various browsers render divs and position, e.g. relative, absolute, fixed, static or whatever it might be. I suggest you replace that div you have in that td cell with a table [I'm not sure why you have the non=breaking line space after the div now, but I left it.

Code: Select all

<TD vAlign=top bgColor=#455258>
            <table cellpadding=0 cellspacing=0 align="center" border=0>
<tr>
    <td>
            <SCRIPT>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
padding=0;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("padding=0;text=<img src=parts.jpg>;showmenu=Samples;");
aI("padding=0;text=<img src=specials.jpg />;showmenu=Milonic;");
aI("image=about.jpg;showmenu=Partners;");
aI("image=equip.jpg;showmenu=Links;");
}
drawMenus();
</SCRIPT>
           </td>
</tr>
</table>&nbsp;</TD>
Post Reply