Urgent Help with Centered Page

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
iteams
Beginner
Beginner
Posts: 8
Joined: Sun May 19, 2002 8:23 pm
Contact:

Urgent Help with Centered Page

Post by iteams »

Hi ,
I just upgraded the script for 3.4 to 5.43. The site was aligned to the left now we need to align it to the center.

How do I bind the popout menus to the cell the mouseover button is in.

I am not using the main menu, just the individual menus.

http://www.2-way.biz/products.htm

This is an example of the coding I am using with the mouseover.

<td width="156">
<a href="../products.htm"
onMouseOut="MM_swapImgRestore();popdown()" onMouseOver="MM_swapImage('Image13','','../images/mouseover/products.gif',1);popup('products')"><img src="../images/default/products.gif" name="Image13" width="156" height="23" border="0">
</a></td>

Thanks


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

Post by kevin3442 »

Hi Sean,

You are giving your submenus absulute positions by setting their top and left properties. If you do that, they will always open in the same location, no matter where the mainmenu "button" image is. Instead, remove top= and left= from the menu definitions. Then:

(1) Give each of the main menu images an id and name, using the id= and name= attributes inside the <img> tag.

(2) Specify the image name/id you want to use as a location anchor in the call to popup(). E.g.

Code: Select all

popup("products", "products_main");
would open the "products" submenu at the image named "products_main".

You can read more about the variations of the popup() method here.

Hope that helps,

Kevin
iteams
Beginner
Beginner
Posts: 8
Joined: Sun May 19, 2002 8:23 pm
Contact:

Post by iteams »

Thanks keven,

That was perfect.

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

Post by kevin3442 »

You're welcome.

One other note... if you want to bump the submenus over some, you can supply top and left offets in your call to popup():

Code: Select all

popup(menuName, imageName, topOffset, leftOffset);
Cheers,

Kevin
iteams
Beginner
Beginner
Posts: 8
Joined: Sun May 19, 2002 8:23 pm
Contact:

Using text links instead of images

Post by iteams »

Hi Kevin and Andy,

How do I center align if I am using text links only.

So I won't have images to use for id and name?

Thanks

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

Post by Ruth »

I looked at the page, could you be a little more descriptive as to what you want to do, what it is you want to be centered?

Ruth
iteams
Beginner
Beginner
Posts: 8
Joined: Sun May 19, 2002 8:23 pm
Contact:

Horizontal Scroll Bars

Post by iteams »

Hi Ruth,

I fixed the last problem but I just noticed. When the main table is aligned to the center the horizontal scroll bars are forced wider than the page should be.

http://www.2-way.biz/products.htm

If I align default there is not problem, just when I align center. The main table is onlt 780 wide.

Thanks

Sean
Post Reply