Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

"drop up" footer menu

Posted on 2014-02-23
5
Medium Priority
?
1,660 Views
Last Modified: 2014-02-24
I am desperately trying to get this menu to pop up from the "home" button. A standard drop-down style, but since it's on the footer, dropping "up". I have tried a million different CSS tweaks and Its not working.

This is the URL

http://www.ewebdesignz.com/blt/

This is the HTML for the drop up

<ul id="navigation" class="navigation">
              <li data-slide="1">Home</li>
              <ul class="dropup"> 
              <li data-slide="2">About </li>
				 <li data-slide="8">Menu & Wines</li>
                 <li data-slide="22">Staff</li>
                  <li data-slide="25">Events</li>
                 <li data-slide="23">Private Dining</li>
                   <li data-slide="24">Press</li> 
	    			<li data-slide="10">Contact</li>
                </ul>
	<div class="clear"></div>
			 </ul>
	

Open in new window


And this is the CSS such as it is:

.navigation {cursor:pointer;}
ul.dropup {display:none}
#navigation .dropup li:hover{display:block;position:absolute:margin:0 0 0 -15px;}

Open in new window


My goal is to get the <li>Home</li> on hover to display the remaining list items in a veritical list growing up from the footer.

Thank you
0
Comment
Question by:mcpilot1
  • 3
  • 2
5 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39881518
CSS:

.navigation {cursor:pointer;position:relative}
ul.dropup {display:none}
#navigation li:hover ul.dropup { display:block;position:absolute;bottom:20px;margin:0 0 0 -15px; }

HTML:

<ul id="navigation" class="navigation">
   <li data-slide="1">
       Home
       <ul class="dropup">
           <li data-slide="2">About </li>
               <li data-slide="8">Menu & Wines</li>
           <li data-slide="22">Staff</li>
           <li data-slide="25">Events</li>
           <li data-slide="23">Private Dining</li>
           <li data-slide="24">Press</li>
             <li data-slide="10">Contact</li>
       </ul>
    </li>
</ul>

Works on a page by itself. Some other css definitions may need to be tweaked when it's incorporated in your complete page.
0
 

Author Comment

by:mcpilot1
ID: 39882313
It works in princicpal but I think because everything is contained within the main "home" <li>, the navigation keeps rolling back up home.

http://www.ewebdesignz.com/blt/

you can roll over the footer on the left where it says "PLACITA" and you'll see the dropup. Click on something like "press" and you will see it roll down to press then right back home. Any solution for this?
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 39882348
What if you arranged it like this?:

<ul id="navigation" class="navigation">
   <li>
       Menu
       <ul class="dropup">
           <li data-slide="1">Home</li>
           <li data-slide="2">About </li>
           <li data-slide="8">Menu & Wines</li>
           <li data-slide="22">Staff</li>
           <li data-slide="25">Events</li>
           <li data-slide="23">Private Dining</li>
           <li data-slide="24">Press</li>
         <li data-slide="10">Contact</li>
       </ul>
    </li>
</ul>

To get the sub menu to open using only css, the sub menu has to be a child of the parent <li>. Otherwise there's no way to access it using css when the <li> parent is hovered.

I think the above arrangement would be less confusing for the end user. Many users will click on "Home" with the intention of opening the submenu and the page will move away from where they want to be. Better to just have "Home" as one of the menu options.
0
 

Author Comment

by:mcpilot1
ID: 39882403
SCORE!!! THAT WORKS!

Thank you. I have been tearing out what is left of my hair for 3 straight days. I can now style it and we're good to go. Thank you!!
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39882797
Glad that worked for you. Thanks for the points.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question