|
||||||
How to Style CFMenu using CSSRelated to: ColdFusion 8.01, cfmenu, css Let’s cut to the chase. Styling cfmenu can be a freakin’ pain in the ass. The Adobe docs are virtually useless in this respect. The tag itself renders differently with respect to different versions of the JRE you may be running. For example, we upgraded from CF8 to CF8.01 and found that our cfmenu tags had lost their style! The following is the result of my efforts over the past few hours to get our menu looking like it did before the upgrade. I’ve basically boiled it down to the bare minimum set of styling requirements to be able to manipulate cfmenu to your liking. Here is all you need to make cfmenu look respectable. What should my cfmenu tag look like?The only thing it needs are:
What should my cfmenuitem tag look like?You don’t need to specify any style information or attributes within the cfmenuitem tag, this will all be handled within your style sheet. What should my style sheet look like?This is a sample style sheet that will style the most desired aspects of the cfmenu tag.
#myMenu ul { #myMenu li { #myMenu li a { That’s it! Notice the hierarchy of:
That’s really the key. Additional NotesThe Yahoo UI (that generates and controls the menu in the background) likes to underline links. Notice that I had to use the CSS “!important” declaration to remove the underlines. I hope this helps you in some way. 2 comments to How to Style CFMenu using CSS |
||||||
|
Copyright © 2010 Ooine.com - All Rights Reserved |
||||||
Thanks. You have saved me alot of time and frustration styling
the cfmenu.
Thanks man, I was trying for days to get ride of the stupid text-decoration underline! cheers.