473,382 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Can I have a vertical sub-menu in a horizontal type CFMenu?

Haitashi
Hello everyone:

I have a CFMenu with the type set to horizontal. I'd like to have the sub-menu items open vertically. Is that possible?

Here is my code. I want the Portals sub-menu (Portal A, Portal B, Portal C) to open vertically instead of horizontally.
Expand|Select|Wrap|Line Numbers
  1.             <cfmenu name="topMenu" type="horizontal" fontsize="14" fontcolor="##7A7251"
  2.                font="'Lucida Sans', verdana, sans-serif;" selectedFontColor="##F58026" 
  3.                 menustyle="background-image:url('../images/toplinks_bg.gif');"    
  4.                 bgColor="##FFFFFF" childstyle="float:center;border-style:solid;padding:0px;border-width:0px;display:inline;margin-left:45px;">
  5.  
  6.                     <cfmenuitem name="home" href="##" 
  7.                     display="Home"/>
  8.  
  9.                 <!--- The ColdFusion menu item has a pop-up menu. --->
  10.                 <cfmenuitem name="portals"
  11.                         href="##" display="Portals" childstyle="border:0px;padding:2px 10px 2px 10px;">
  12.                     <cfmenuitem name="fso"
  13.                         href="##" display="Portal A"/>
  14.                     <cfmenuitem name="fso"
  15.                         href="##" display="Portal B"/>
  16.                     <cfmenuitem name="fso"
  17.                         href="##" display="Portal C"/>
  18.                 </cfmenuitem>
  19.  
  20.                 <cfmenuitem name="logout" href="##" 
  21.                     display="Logout"/>
  22.             </cfmenu>
May 29 '08 #1

✓ answered by Haitashi

Found the culprit:

#toplinks li {
display: inline;
}

The div class where I placed the CFMenu was called toplinks. This display attributed caused the sub menu to open horizontally instead of the default vertical. Good to know that there's a way to do that since by default submenu will open vertically and there's no clear way to change it.

So, in case anyone ever needs vertical sub menus in CFMenu - There ya go! jeje

5 5540
acoder
16,027 Expert Mod 8TB
Aren't all sub-menus vertical? See third item here.
May 29 '08 #2
Acording to that link:
Menus can have submenus, but only the top menu can be horizontal. All children of a horizontal menu are vertical.
However, no matter if I set the menu type to horizontal or vertical, all the child nodes of "Portals" still open horizontally. Is this just me? O.o

I'm suspect of styling... Maybe there's some CSS misfit code that's affecting how it's being displayed. I'm gonna look into that and report back.
May 30 '08 #3
Yes, there are some styling issues. Apparently the site's styles are overriding the YUI CSS. I ran an instance of CFMenu on a blank page on the same server and it worked fine.

Very imp lesson learned. I will now hunt for the specific styles and make changes. I will also convey to our designer that he should use more specific styling. As far as I can tell, he applied styles to UL and LI. This looks like the cause of the problem.
May 30 '08 #4
Found the culprit:

#toplinks li {
display: inline;
}

The div class where I placed the CFMenu was called toplinks. This display attributed caused the sub menu to open horizontally instead of the default vertical. Good to know that there's a way to do that since by default submenu will open vertically and there's no clear way to change it.

So, in case anyone ever needs vertical sub menus in CFMenu - There ya go! jeje
May 30 '08 #5
acoder
16,027 Expert Mod 8TB
Thanks for posting the solution and, what do you know, you've actually discovered a way to display sub-menus horizontally should anyone need it.
May 30 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Don Schneider | last post by:
I tried to setup a frameset which consists of 4 different subframes. Each of these subframes should fetch a different web page from the internet and display it completely (!). BUT: the vertical...
2
by: Felipe Gasper | last post by:
I'm trying to make some "sub-cells" in an HTML table and to control their positioning and content presentation via CSS. In the table at the following URL: ...
11
by: michael | last post by:
I have a group of links prefixed with the arrow as follows: »link1 »link2 »link3 I would like the arrows to be vertically aligned middle of the text, like as if they were bullets of list item,...
2
by: deBassMan | last post by:
Hi all Using MS Access 2000, Win XP I require a quick and dirty (or all-singing and dancing) way of detecting whether a vertical scrollbar is visible on a sub-form. apologies if posted in...
1
by: deBassMan | last post by:
Hi all Using MS Access 2000, Win XP I require a quick and dirty (or all-singing and dancing) way of detecting whether a vertical scrollbar is visible on a sub-form. apologies if posted in...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
3
by: Spiros Bousbouras | last post by:
The fact that vertical tab and form feed exist both in the basic source character set and the basic execution character set suggests to me that there is a class of display devices where vertical...
13
by: Bill | last post by:
Hi How can I have IE7 act correctly on that ? The rules make the link text go down when hovered. It works in FF , I had to add a hard space right after the LI tag to have OP9 work but I can't...
2
by: ismailc | last post by:
Hi, I need help please! I want to vertical align the text within a text box. I can set the vertical align of the text box but not the text. My text box has a style property of: style...
40
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.