| Horizontal -> Left Aligned
DHTML Menu Builder supports aligning the menus vertically and horizontally.
In this sample you can see that both the toolbar and the menus are horizontally aligned.
Also notice that all the menus appear aligned to the left of the toolbar; this is not DHTML Menu Builder's default behavior but its a highly requested feature among DHTML Menu Builder users. By default, DHTML Menu Builder will always align menus to their parent toolbar items.
So, how did we manage to create such effect if DHTML Menu Builder doesn't support it?
The answer is by using a "Custom Offset Definition".
Custom offset definitions can be used to apply highly customizable conditions to align and offset the position of the menus as required.
Here's how we created this definition:
Very easy. Let's analyze the code part by part:
NOTE: In case that you want to achive the same effect on a vertical toolbar
you should use this code instead:
xy = parseInt(tbS.top);