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

SubImage is screwing up my imagewidth.


Poster: kelemvor
Dated: Friday January 30 2004 - 1:50:24 GMT

Howdy,

Here's the samples. (None of the links work so don't bother clicking them)

WITHOUT Subimage (looks great)
http://www.gmar.ws/menu/menu.htm

WITH Subimage (looks crappy)
http://www.gmar.ws/menu/menu2.htm

There is no difference in the two menu_data files except for the line:
subimage="arrow.gif" in the style section. But on the one WITH that image, it totally screws up the imagewidth. Any suggestions?

I just want the little arrow to be within the imagewidth that I have already specified.


Poster: Ruth
Dated: Friday January 30 2004 - 4:12:22 GMT

1. Your image is 135px wide not 118.

2. you need to specify the itemwidth and itemheight in each menu and submenu rather than globally to stop the problem with the subimage and remove the same from the global style. But, if you specify it as smaller than the actual image, it just cuts off the pixel amount on the right side making that side flat and the arrow ends up on the dark blue and invisible.

3. the arrow ends up way over almost off the right rounded corner, that's because the image is actually wider than that corner..the transparent part, I fiddle with the image and if you make it 12px wide and 7 high with the arrow all the way to the left and the rest transparent it will make the arrow site about 2 pixels inside the curve. Also, in case you didn't know, if you used a transparent image the size of the arrow.gif as the subimage and then used arrow.gif for onsubimage, then the arrow would only show when they mouseover it.
Code:
subimage="blank.gif";
onsubimage="arrow.gif";

4. I think you need to change the submenu offset at the top of the menu_data.js file. Right now it's overlapping the main menu when it opens, unless you want that. You might try _subOffsetLeft=1 that moves it just one pixel to the right of the main menu when it opens.

Hope that helps

Ruth


Poster: kelemvor
Dated: Friday January 30 2004 - 4:35:08 GMT

innkeeper9 wrote:
1. Your image is 135px wide not 118.

I know. However when I set the PADDING setting, it was shifting the whole thing over and making the image start to wrap. I had to change the Itemwidth to make it look right. Putting the ItemWidth in the Style area and having Padding in there seems to conflict with each other and make things not work right. The image is just the grey oval button.

innkeeper9 wrote:
2. you need to specify the itemwidth and itemheight in each menu and submenu rather than globally to stop the problem with the subimage and remove the same from the global style. But, if you specify it as smaller than the actual image, it just cuts off the pixel amount on the right side making that side flat and the arrow ends up on the dark blue and invisible.

That seemed to do the trick. When I put the ImageWidth setting back in each item then I need to change it back to 135 to make it look right and that also makes it work with the SubImage property.

innkeeper9 wrote:
3. the arrow ends up way over almost off the right rounded corner, that's because the image is actually wider than that corner..the transparent part, I fiddle with the image and if you make it 12px wide and 7 high with the arrow all the way to the left and the rest transparent it will make the arrow site about 2 pixels inside the curve. Also, in case you didn't know, if you used a transparent image the size of the arrow.gif as the subimage and then used arrow.gif for onsubimage, then the arrow would only show when they mouseover it.
Code:
subimage="blank.gif";
onsubimage="arrow.gif";


I like the arrow to always be there so people know which menu items are expandable at a glance.

innkeeper9 wrote:
4. I think you need to change the submenu offset at the top of the menu_data.js file. Right now it's overlapping the main menu when it opens, unless you want that. You might try _subOffsetLeft=1 that moves it just one pixel to the right of the main menu when it opens.


Yeah, have to play with that and see what looks good.

innkeeper9 wrote:
Hope that helps

Ruth


Definitely.

SUMMARY: Putting Padding AND ItemWidth in the Style area messes things up. Putting Padding in the Style and ItemWidth in each menu area works just fine.

THanks.