Solved

Problem with display table.tr

Posted on 2010-09-17
3
315 Views
Last Modified: 2013-11-19
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}
0
Comment
Question by:bongii
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
code-colors earned 500 total points
ID: 33699439
Could you please try

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

Author Comment

by:bongii
ID: 33699534
Nice Code-colors. Thanks :)
0
 

Author Comment

by:bongii
ID: 33699544
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}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to count occurrences of each item in an array.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now