Can't get "subimageposition" to work.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Can't get "subimageposition" to work.

Post by vikenk »

Hello everyone,

For some reason, I can't combine more than one variable in the subimageposition command. I have a menu floating right and I want the menu to be left oriented and vertically centered, but I can't get it to work.

In the menu quick reference guide it says:

"Values: top, left, right, center, middle or bottom. Or a sensible combination of 2 values separated by a semi colon. Note that tall text values must be declared inside quotes. Example: subimageposition='left';"

I'm using:

subimageposition="left;middle";

When I do that, the arrow just moved to the upper *right* corner. If I use any combination of two positions, it doesn't work. I tried doing "middle;left" and vice versa but I can't get it to work. Can anyone tell me what I'm doing wrong? Here's my style:

with(Header=new mm_style()){
align="center";
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
fontfamily="arial,verdana";
fontsize="90%";
fontstyle="normal";
fontweight="normal";
headerbgcolor="#c4ecff";
headercolor="#000000";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#c4ecff";
oncolor="#000000";
padding=1;
separatorcolor="#999999";
separatorsize=1;
subimage="arrow_left.gif";
subimageposition="left;middle";
subimagepadding=8;
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color=#777777', Direction=135, Strength=5)";
}


Thanks in advance.

Viken K.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Can't get "subimageposition" to work.

Post by vikenk »

vikenk wrote:I have a menu floating right and I want the menu to be left oriented and vertically centered, but I can't get it to work.
I'm sorry, that should read:

I have a menu floating to the right and I want the *arrow image* to be left oriented and vertically centered, but I can't get it to work.
tootricky
Advanced
Advanced
Posts: 28
Joined: Tue Dec 07, 2004 4:07 pm

Post by tootricky »

yep you won't get much joy with middle:left or in fact middle:anything it just doesn't like it... but subimageposition="left"; should at least put the image on the left hand side.

Now if I do that to my own menu it puts my subimage slap bang in the (vertical) middle on the left! But it doesn't work for you. Very weird!

My menu style is nearly identical to yours so if this does not work for you I think it must be something in the menu properties... Have you set a height for your menu? I think if you do the image should align to the center naturally.

Good Luck! :)
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Hi,

That's interesting. If you put subimageposition="left" it also centers it vertically? If I don't add subimagepadding=8, the arrow will be in the upper left corner. Below is a copy of my style. You can see the result here:

http://www.ssaes.org/test_site/eng_gr1_2.htm

You'll see the arrow on the bottom of the right-floating menu. Again, if I don't add subimagepadding=8, the arrow will be in the upper left corner. Thanks for replying.


with(Header=new mm_style()){
align="center";
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
fontfamily="arial,verdana";
fontsize="90%";
fontstyle="normal";
fontweight="normal";
headerbgcolor="#c4ecff";
headercolor="#000000";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#c4ecff";
oncolor="#000000";
padding=1;
subimage="arrow_left.gif";
subimageposition="left";
subimagepadding=8;
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color=#777777', Direction=135, Strength=5)";
}
tootricky
Advanced
Advanced
Posts: 28
Joined: Tue Dec 07, 2004 4:07 pm

Post by tootricky »

in the center for me in firefox, safari and opera!?
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

tootricky wrote:in the center for me in firefox, safari and opera!?
Yes, that's because of the "subimagepadding=8". If I remove that, the arrow moves to the top-left.

Sorry, I should upload a non-working sample but I can't now. The corporate site that I'm at blocks FTP transfers. When I get home tonight, I'll upload a non-working sample.

Thanks.

Viken K.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

I was just going to post up a non-working example when I had a epiphany and answered my own question...

...I had td { vertical-align: top } in my css. That's why the arrow was always in the upper left corner. When I remove the td { style }, the arrow behaves normally. <SIGH>...

However, I still can't get two commands to work together - subimageposition="top;left" or any combination of two commands doesn't work.

According to the Menu Quick refernece guide, I should be able to do that. However, my main concern was centering the arrow, and I did.

Thanks to all who replied...

Viken K.
tootricky
Advanced
Advanced
Posts: 28
Joined: Tue Dec 07, 2004 4:07 pm

Post by tootricky »

vikenk wrote:I was just going to post up a non-working example when I had a epiphany and answered my own question...

...I had td { vertical-align: top } in my css. That's why the arrow was always in the upper left corner. When I remove the td { style }, the arrow behaves normally. <SIGH>...

However, I still can't get two commands to work together - subimageposition="top;left" or any combination of two commands doesn't work.

According to the Menu Quick refernece guide, I should be able to do that. However, my main concern was centering the arrow, and I did.

Thanks to all who replied...

Viken K.
Yeah using generic ids like td, table and body in your css is going to affect your menus... I prefer using classes in thos instances.
Post Reply