473,396 Members | 2,021 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,396 software developers and data experts.

How to change a horizontal drop down menu to do this?

I have a working horizontal drop-down menu that is css driven, on hover sub-menu items currently appear below the parent item. I however, would like to know if I can make them appear ABOVE the parent item instead. I know it's not traditional but the site I'm working on would be perfect if I can get it working!

I'd appreciate any and all info!
Oct 21 '10 #1

✓ answered by JKing

To make your dropdown appear above your menu you want to set the sub menu ul to be positioned relative to the bottom instead of the top.

I copied your html for your menu and the related css. Below are the changes I made.
Expand|Select|Wrap|Line Numbers
  1. .art-menu ul
  2. {
  3.   visibility: hidden;
  4.   position: absolute;
  5.   z-index: 10;
  6.   left: 0;
  7.   /*top: 0;*/
  8.   background: none;
  9. }
  10.  
  11. .art-menu li:hover>ul
  12. {
  13.   visibility: visible;
  14.   bottom: 0;
  15. }
  16.  

10 1628
Death Slaught
1,137 1GB
Yes it's possible, but we need either a link to your site or the code you're using.


Thanks, Death
Oct 21 '10 #2
No problem! www.altruisticsolutions.net/ts2 I appreciate the help! You should see the menu currently drops down (about us)- I don' t have the menu fully populated yet or anything.
Oct 21 '10 #3
drhowarddrfine
7,435 Expert 4TB
I don't see any menu at all.
Oct 21 '10 #4
JKing
1,206 Expert 1GB
To make your dropdown appear above your menu you want to set the sub menu ul to be positioned relative to the bottom instead of the top.

I copied your html for your menu and the related css. Below are the changes I made.
Expand|Select|Wrap|Line Numbers
  1. .art-menu ul
  2. {
  3.   visibility: hidden;
  4.   position: absolute;
  5.   z-index: 10;
  6.   left: 0;
  7.   /*top: 0;*/
  8.   background: none;
  9. }
  10.  
  11. .art-menu li:hover>ul
  12. {
  13.   visibility: visible;
  14.   bottom: 0;
  15. }
  16.  
Oct 21 '10 #5
Thanks so much, I had tried something similar but I missed the change to .art-menu ul! It works now, thanks!
Oct 21 '10 #6
Can I ask what browser you're using that you don't see the menu?
Oct 21 '10 #7
Death Slaught
1,137 1GB
  1. This solution only works in Firefox, and only one submenu appears.
  2. The menu is shoved to the left in Safari and Chrome; and Opera has a z-index issue with the submenu. I don't have IE. Also, Chrome scrolls your content.
  3. You're floating elements contained by an absolutely positioned element. This removes these elements from the normal flow of the page.
  4. Unless you have 12,999 other elements that need to be on top of one another - the z-index value will never need to be 13,000. It's confusing and takes more time to find the smallest or largest value.
  5. Have a look at this.


Regards, Death
Oct 21 '10 #8
Bah, I had only looked at it in Firefox and Explorer so far. I only had 1 sub menu up so far, so there was nothing else to show the new additions seem to be popping up okay. I do see the issue with Chrome now that I'm looking at it. That should be fun to try to fix...
Oct 22 '10 #9
2) Anyone have a better solutions for centering that DiV? (the menu) One that works in Chrome too?

#wrapper {
position: absolute;
bottom: 50%;
right: 50%;
height: 500px;
width: 600px;
}
#container {
position: relative;
left: 50%;
top: 50%;
}

html-

<div id="wrapper">
<div id="container">
<div id="top-menu"><jdoc:include type="modules" name="user3" /></div></div></div>
Oct 22 '10 #10
Death Slaught
1,137 1GB
I thought I had checked this in Firefox but apparently I didn't. It's what Doc was talking about. The menu is shoved all the way down and almost off of the page. You can see a few pixels of it.

As for fixing all of this... The image you're using for the menu's background is requiring too much work. Just edit the image to fit to your menu, not vice versa. This should free up a few things for set stylings.

Do you understand the relationship between the browser and an element being styled with a fixed position?


Thanks, Death
Oct 22 '10 #11

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

Similar topics

10
by: Haines Brown | last post by:
I've implemented the horizontal drop down menu discussed recently in this newsgroup, and it works nicely under Galeon and Mozilla, but not IE 5.0. Here are the problems: Under IE 5.0, the...
4
by: Amil | last post by:
Does anyone have a recommendation on an AWESOME (free) horizontal drop-down menu using DTHML? I'm not using VS 2005 yet. Thanks. Amil
1
by: Ziphyre | last post by:
Hi, I've got some problems with horizontal drop down menu. It looks fine under Firefox, a mess under IE. I've noticed the following differences/problems: - Extra space between menu items and...
1
by: toby | last post by:
Does anyone have an idea as to why the js does not work on the horizontal drop down menu in IE 6? I have pretty much used exactly what A List had posted in their article titled, "Drop-down Menus...
2
by: boien | last post by:
How can i go about this? I would greatly appreciate any expert assistance with this issue, i am trying to find out how but i cant seem to find any way
1
by: azeemqaiser | last post by:
Hi All, I have a form with two drop down controls. I want to change the values of Drop Down Menu 2 if i select some value in Drop Down Menu 1. Like If i select country then all the states of...
0
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of...
1
by: GauthamNaidu | last post by:
How to create a pure css horizontal drop down menu as designed in your top menu
0
by: Jack Gray | last post by:
I am using a nested list for a simple drop-down menu. All CSS and XHTML validate. The menu is displayed properly in 7 different newer browsers including IE7, Firefox, Opera & Safari. I have...
0
by: Jack Gray | last post by:
Hi everyone, I am using a nested list for a simple drop-down menu. All CSS and XHTML validate. The menu is displayed properly in 7 different newer browsers including IE7, Firefox, Opera & Safari....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.