how can i start a menu in right=150 (like left)...

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dekel
Advanced
Advanced
Posts: 11
Joined: Sat Dec 27, 2003 8:43 pm

how can i start a menu in right=150 (like left)...

Post by dekel »

i know that it isn't possible, so what can i do?
lots of thanks :)

Dekel
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: how can i start a menu in right=150 (like left)...

Post by kevin3442 »

dekel wrote:i know that it isn't possible, so what can i do?
Hi Dekel,

I believe it's possible, but how easy it would be depends on a few things. (1) I assume you're talking about a vertical menu, correct? (2) Do you use itemwidth to set each item in the menu to a specific width? (3) Do you use menuwidth to set the menu's overall width? With that information, I may be able to whip up a solution.

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

Post by Ruth »

Meaning you want the menu on the right side of the window? 150 in from that side? If that's the case, I don't know if you can code it like that, but you could use a table, align it right, put a small 1px high 150 px wide transparent.gif into the right column, then put the menu in the second column from the right. You'd be setting the table position and putting the menu in it the way you want it to be. I remember reading in some post about positioning the menu by images. You might check that out also.

Mine is harder to do, pay attention to Kevin :lol:

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

innkeeper9 wrote:...pay attention to Kevin :lol:
Ruth, I wonder if you could tell some other people that for me? ;)

If you want the right edge of the menu to be 150px from the right side of the browser, you can code it directly in the menu script, using the screenposition and left menu properties, like so:

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="right"; // menu to right side of window
left="offset=-150"; // menu adjusted to the left by 150px.
top=10;
.
.
.
aI("etc etc etc"); // define menu items
}
Only thing is... I don't think the original idea was to place the right side of the menu 150 px from the right side of the window. I believe the original problem was to place the right side of the menu at left coordinate 150; i.e., the right side of the menu 150 px from the left side of the window... is that correct Dekel?

Kevin
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Agreed Kevin, I think there is alittle miscommunication on whats requested here. So dekel knows, the coordinates start in the upper left corner of the browser, so if you want something to be 150px in from the left side, its left=150, not right=150. Its because you want XXXpx padding on the left....not XXXpx moved to the right. Anyways, just my two cents.... hehe

And Ruth, how come you use the table option? The method kevin described with the screenposition=right and the offset is probably the way to do what you are doing. No?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply