Link to home
Start Free TrialLog in
Avatar of Jesper Christensen
Jesper Christensen

asked on

Problem with display table.tr

Hi guys.

I have this table:

    <TABLE id="ProductMenu">
        <TR>
            <TD><A href="#">Main menu</A></TD>
        </TR>
        <TR id="test">
            <TD>
                <A href="#">Sub menu</A>
            </TD>
        </TR>
    </TABLE>

I  want to hide "Main menu" and show "Sub menu" with CSS.

Have tried something like this, but it dosen´t work. Any suggestions?
#ProductMenu tr            {display:none}
#ProductMenu tr #test      {display:inline!important}
ASKER CERTIFIED SOLUTION
Avatar of code-colors
code-colors
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jesper Christensen
Jesper Christensen

ASKER

Nice Code-colors. Thanks :)
Ahh I just saw that the id is a number.

This dosen´t work:

  <TABLE id="ProductMenu">
        <TR>
            <TD><A href="#">Main menu</A></TD>
        </TR>
        <TR id="112">
            <TD>
                <A href="#">Sub menu</A>
            </TD>
        </TR>
    </TABLE>

#ProductMenu tr            {display:none}
#ProductMenu tr#test      {display:block!important}