Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 05-22-2009, 02:52 AM dropdown menu
harish's Avatar
Average Talker

Posts: 26
Name: Harish kumar
Trades: 0
I have created a drop down menu only using css. It is working fine in the firefox but not on the internet explorer. Here is the code of that.

Code:
<html>
<head>
<style type="text/css">
ul {
   margin: 0;
   padding: 0;
   list-style: none;

}
ul li {
   
   position: relative;

   float: left;
        width: 100px;

}
li ul {
   position: absolute;
   top: 30px;
   display: none;
}
ul li a {
   display: block;
   text-decoration: none;
   line-height: 20px;
   color: #000;
   padding: 5px;
   background: #CC0;
   margin: 0 2px;
}

ul li a:hover { background: #66F; }
li:hover ul, li.over ul { display: block; }
</style>
<body>
<ul id="nav">
   <li><a href="">Home</a></li>
    <li><a href="">Web</a>
      <ul>
        <li><a href="">Browser</a></li>
        <li><a href="">Search</a></li>
      </ul>
    </li>
    <li><a href="">Monkey</a>
      <ul>
        <li><a href="">Eating Banana</a></li>
        <li><a href="">Throwing Poop</a></li>
      </ul>
    </li>
    <li><a href="">Contact</a>
      <ul>
        <li><a href="">Via Web</a></li>
        <li><a href="">Via Phone</a></li>
        <li><a href="">Via tin can and string</a></li>
      </ul>
    </li>
   
</ul>

</body>
</html>
Plz help me so that It also work on the internet exporer
__________________

Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
harish is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-22-2009, 09:59 AM Re: dropdown menu
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Your problem is right here: li:hover ul - IE does NOT support the hover pseudo-class on anything but the <a> tag. So, do a search for "whatever hover" and grab the bit of javascript needed to make IE6 work.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-28-2009, 02:39 AM Re: dropdown menu
harish's Avatar
Average Talker

Posts: 26
Name: Harish kumar
Trades: 0
Thanks for this information. Can it is not possible to make dropdown menu without javascript. I want to create dropdown menu only using css and not javascript
__________________

Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
harish is offline
Reply With Quote
View Public Profile
 
Old 05-28-2009, 09:46 AM Re: dropdown menu
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Can it is not possible to make dropdown menu without javascript
Yes, it's possible, and that is NOT what I was telling you. What I said was that IE does NOT SUPPORT the hover pseudo-class on anything except the <a> tag ! In order to force IE to hover on anything else, like the <li> tag as you have in your code, you need that small bit of javascript to make it work. Whatever:hover is NOT a javascript dropdown menu, all it does is force IE into making the hover work on any tag, not just the <a>.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-29-2009, 02:37 AM Re: dropdown menu
harish's Avatar
Average Talker

Posts: 26
Name: Harish kumar
Trades: 0
Thanks for the replay can you give me example of the drop down menu which is working in all browsers..
__________________

Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
harish is offline
Reply With Quote
View Public Profile
 
Old 05-29-2009, 09:26 AM Re: dropdown menu
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Take your pick: http://www.cssplay.co.uk/menus/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-30-2009, 02:11 AM Re: dropdown menu
harish's Avatar
Average Talker

Posts: 26
Name: Harish kumar
Trades: 0
Thanks for sharing this useful site. This link is very useful for me. I can learn lot of methods of dropdown menu through this link.
once again thanks a lot.
__________________

Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
harish is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to dropdown menu
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.52983 seconds with 12 queries