MenuNav Node Plugin: Left Nav With Submenus With Rounded Corners
+ ++
+This example demonstrates how to add rounded corners to submenus of a menu built using the +MenuNav Node Plugin. +
+ + ++ + + View example in new window. + + +
+ + +Creating the Rounded Corner HTML
++One way to add rounded corners to submenus is to append decorator elements to the node representing +a submenu's bounding box. As the name implies, decorator elements add no semantic value to the +markup, but enable additional styles to be applied. When adding any decorator elements to create +effects like shadows or rounded corners, always add those elements via JavaScript, since it is only +when JavaScript is enabled that a menu's markup is transformed in a drop-down menu system via the +MenuNav Node Plugin. +
+ +
+Each rounded corner is created by applying a background image to a <div>.
+A class name identifying the corner will be added to each <div>.
+The <div>s used to create the right corners will be nested inside the
+<div>s used to create the left corners, and each <div>
+for the left corners will have an additional class name of yui-menu-corner. The
+template for each set of rounded corners comes together as follows:
+
+The <div>s for each corner is created by passing a string
+of HTML to Node's create method. Use
+the queryAll method to
+retrieve Node instances for each submenu, and the
+appendChild and
+insertBefore
+methods to add the rounded corners <div>s to the bounding box of each submenu.
+
