CFMENU - Setting childstyle

Posted At : November 21, 2007 1:57 PM | Posted By : Dave
Related Categories: UI,ColdFusion 8

While recently working with CFMemu in CF8 I ran across an issue with IE. The sub menu items were appearing on top of the parent items. After tons of digging I was able to figure out the problem. The problem was when setting the CHILDSTYLE in the cfmenu tag and putting in "overflow:hidden". For some reason this caused the sub menus to display over the parent, but only in IE. Below is a sample of code that will demonstrate. This is taken from the help docs. I took out some menu options to shrink the code.

<cfmenu name="menu" type="horizontal" fontsize="14" bgcolor="##CCFFFF" CHILDSTYLE="overflow:hidden;">
<cfmenuitem name="coldfusion"
href="http://www.adobe.com/products/coldfusion" display="ColdFusion">

<cfmenuitem name="buy"
href="http://www.adobe.com/products/coldfusion/buy/" display="Buy"/>

<cfmenuitem name="documentation"
href="http://www.adobe.com/support/documentation/en/coldfusion/"
display="Documentation"/>

</cfmenuitem>
</cfmenu>

Hope this helps you avoid the headaches I received.

--Dave

Comments
Speaking of IE, your blog content is about 20 pixels west of your template background in IE7. FYI. You have some great content, though, so I'm willing to "read between the lines" (Even this comment form has issues with wrapping--can't see everything I'm typing).

Before everyone tells me I need to move to FireFox, I already use FireFox on my MacBook and for testing on my Vista development box, but let's face it: IE cannot be ignored. Thanks...
# Posted By Kevin | 12/31/07 5:01 AM