Solved

Problem with display table.tr

Posted on 2010-09-17
3
310 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

14 Experts available now in Live!

Get 1:1 Help Now