Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #173

I'm using TreeMenu Magic (TMM) on a page that is using the P7_EqualColumn script to set the column heights. When the menu is opened it the EqaulColumn script does not resize the columns to the new height, is there a fix?

The Answer

Prepared Oct. 2005 by Gerry Jacobsen, PVII

The sidebar div is absolutely positioned, which makes it and all of its content grow outside of the natural page flow. The consequence of this is that there is nothing to trigger the EqualColumns script into action whenever the height of the sidebar is changed.

You'll need to employ a small tweak to trigger Equal Columns script directly. The best way to do this is to add a call to the EqualColumn scripts directly within the TreeMenu Magic scripts. Whenever a sub menu is opened or closed we want the Equal Column script to execute and reset the column heights.

Here' how:

1. Open the TMM script file, locate the last line of the "P7_TMenu(b,og)" function, line 8:

b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}

2. Add this:


in between the last two braces, }}, so it looks like this:

b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}P7_colH2();}

Watch the wrap, be sure that this is all on one single line.

Note: The Equal Column scripts have been updated to version 2 and use this function: P7_colH2();. If you are using the original version 1 Equal Column scripts then use this function call instead: P7_colH(); .

That's it. The Equal Column script will now adjust the height of the columns whenever a sub menu in TreeMenu Magic is open or closed.

Back to the questions list