1) Script Title: AnyLink CSS Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...anylinkcss.htm
3) Describe problem: I am using this with a block anchor in a table cell. Is there any way to make the dropdown fit with width of the cell, which varies based on the client's resolution? If not, can I do so if I switch to the JavaScript version of AnyLink?
As a very minor aesthetic issue, the anchor's Hover behavior ends when the user mouses over the dropdown. Is there a clever way to convince the computer that it's still hovering?
This is the CSS involved:Code:<div class="tablecontainer"> <table> <tr> <td> <a href="http://www.dynamicdrive.com" class="anchorclass" rel="submenu1">OPTION 1</a> <div id="submenu1" class="anylinkcss" style="display: block;"> <ul> <li><a href="http://www.dynamicdrive.com/">Dynamic Drive</a></li> <li>(etc...)</li> </ul> </div> </td> <td> <a href="http://www.dynamicdrive.com" class="anchorclass" rel="submenu2">OPTION 2</a> <div id="submenu2" class="anylinkcss" style="display: block;"> <ul> <li><a href="http://www.dynamicdrive.com/">Dynamic Drive</a></li> <li>(etc...)</li> </ul> </div> </td> <td> And so on... </td> </tr> </table> </div>
Code:.tablecontainer { position: relative; } .tablecontainer table { position: absolute; bottom: 0; margin: 0; padding: 0; width: 100%; border-collapse: collapse; } .tablecontainer td { padding: 0; } .tablecontainer td a { display: block; } .tablecontainer td a:hover { background-color: Red; }



Reply With Quote


Bookmarks