Jump to content

css drop down menu


afallingpanda

Recommended Posts

<table cellspacing=0 cellpadding=0 class="headertable">
<tr>
<td  class="navbar"><a href="index.php">Home</a></td>
<td  class="navbar"><ul class="drophead">
<li><a href="">Businesses</a></li>
<ul>
<?php
 
$myquery = sql_query("SELECT objectid, object_title FROM webmanage_objects WHERE parentid=6226 AND archived=0 AND is_visible=1 AND object_type='Organisation' ORDER BY object_title");
 
while ($myrow = sql_fetch_assoc($myquery)) { 
print"<li class=\"dropdown\">";
 
transfer_row($myrow);
print "<a href=\"../businesses.php?id=$row_objectid\">$row_object_title</a>";
 
print"</li>";
}
print"</td>";
?>
 
<td  class="navbar"><a href="gallery.php">Gallery</a></td>
<td  class="navbar"><a href="contact_us.php">Contact Us</a></td>
</tr>
 
</table>
</div>

 

 

thats my code for the navbar, and heres the code for the css dropdown that i have created:

 

.drophead { 
    position: relative;
    top: 0px;
    left: 0px;
}


.drophead ul { 
    position: absolute;
    top:17px;
    width:200px;
    display: none;
    border:1px solid #0B3B0B;
    background-color:#B4C4B0;
    text-align:left;
}


.drophead ul li a{
    display:block;
    border-top:1px solid #8C9A89;
}


.drophead ul li a:hover{
    border-bottom:none;
    background-color:#A5C39E;
    padding-bottom:0px;
}


.drophead:hover ul { 
    display: block;
}

i was wondering if someone could tell me how to add a cool transition to it, so the list shows with some animation.

thanks

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.