Jump to content

li and link


Liquid Fire

Recommended Posts

here is the css code for my menu(not my code, something i found somewhere online):

/*Top Drop Down Menu*/
#menu 
{
    width: 100%;
    float: right;
}

#menu ul
{
    color: white;
    list-style: none;
    margin: 0;
    padding: 0;
    float: left;
}

#menu h2 
{
    font: bold 16px arial, helvetica, sans-serif;
    display: block;
    margin: 0;
    padding: 2px 3px;
}

#menu li 
{
    background-color: #BBBBBB;
    font: bold 10px arial, helvetica, sans-serif;
    display: block;
    margin: 0;
    padding: 2px 3px;
}

#menu li.sub_menu
{
    width: 115px;
    padding-top: 2px;
    padding-bottom: 2px;
    background-color: #999999;
}

#menu a 
{
    text-decoration: none;
    color: #3E3E8E;
    width: 115px;
}

#menu a:hover 
{
    color: #FFFFFF;
}

#menu li 
{
    position: relative;
}

#menu ul ul 
{
    position: absolute;
    z-index: 500;
}

#menu ul ul ul 
{
    width: 150px;
    top: 0;
    left: 100%;
}

div#menu ul ul,
div#menu ul li:hover ul ul,
div#menu ul ul li:hover ul ul
{
    display: none;
}

div#menu ul li:hover ul,
div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{
    display: block;
}

 

and here is and example of my XHTML:

<ul>
    <li>
        <h2><a href="javascript:void();">Project Admin</a></h2><ul>
            <li class="sub_menu">
                <a href="<?php echo $kd_config['site_url']; ?>/admin/project/index.php">Home</a>
            </li>
            <li class="sub_menu">
                <a href="<?php echo $kd_config['site_url']; ?>/admin/project/manage.php?type=new_project">Add Project</a>
            </li>
        </ul>
    </li>
</ul>

 

but the link only appears when mouse is over the work and most other css based menu have it if it is anyway, any help?

Link to comment
https://forums.phpfreaks.com/topic/58337-li-and-link/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.