Solved

Problem with display table.tr

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 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