Solved

"drop up" footer menu

Posted on 2014-02-23
5
1,272 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 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
using web browser with BING 40 86
lastpass auto fill login form 5 24
update field on focusout 15 22
HTML CSS 7 18
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
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)

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now