So I am trying to make a dropdown menu where when hovering a link. A table is shown underneath the link. I don’t understand why it wont work. Check out the fiddle link.
FIXED LINK
http://jsfiddle.net/ThobiasN/Pt3db/
Html code example:
<a class='nav' href='#'>Hover me</a>
<table>
<tr>
<td class='dropdown'><p>Show me</p></td>
</tr>
</table>
Css code example:
td.dropdown
{
display:none;
}
a.nav:hover > table
{
display:block;
}
I think at the end you would need to use some Javascript code to achieve that, but what you are doing wrong is this:
>simbol is for direct childdisplay: nonefor thetableelement, not thetdSolution:
>symbold for this one:+to get the next elementHTML
CSS
JSFiddle
http://jsfiddle.net/Pt3db/5/
Plus advices
table(table for tabular data)