Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7618933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:31:57+00:00 2026-05-31T03:31:57+00:00

I have a layout that looks like this <div class=categoery> <span>categorie title</span> <table> <tr

  • 0

I have a layout that looks like this

<div class="categoery">
    <span>categorie title</span>
    <table>
        <tr class="item show">....</tr>
        <tr class="item show">....</tr>
        <tr class="item none">....</tr>
    </table>
</div>

<div class="categoery">
    <span>categorie title</span>
    <table>
        <tr class="item none">....</tr>
        <tr class="item none">....</tr>
        <tr class="item none">....</tr>
    </table>
</div>

​

Now what I want to the is the following. The first div will be the category title, and the two rows.

Now in the second div, I want the whole div completely hidden.

CSS has no parent seelctor like: div < tr.none{ display:none; }.

I asume another thing I can use is the hasClass from jQuery, but I was wondering if there is a pure CSS approuch.

==

Maybe something like setting the div to height:0, but block elements(tr) with a top margin will force the div to expand??

Hope this makes sense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:31:58+00:00Added an answer on May 31, 2026 at 3:31 am

    You can do something like this

    $('.categoery').each(function(k,v) {
        if($(this).children('table').find("tr").css("display")=='none') {
        // alternate
      //if($(this).children('table').find("tr").hasClass("none")) {
            $(this).children('span').hide();
        }
    });
    

    I even created a demo. I hope this was what was asked for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic website nav layout that looks like this: <li class=folder parent_folder>
I have a layout that looks like this: It's a table with one cell
I have a button that basically looks like this: <Button android:id=@+id/admin_new_questions android:layout_width=fill_parent android:layout_height=wrap_content android:text=See
I have a header set up like this: <div id=header> <div class=container_16> <div class=grid_4><img
I have a list that looks like this -------------------- | | | | 1
I have this layout that works correctly, a relative layout with a text view
So I have a table layout that Im adding rows to through code since
I'm looking to have an image object that looks like it's pinned to the
I have a view file like this : <html> <head> <meta name=layout content=main />
I have a layout that contains two ImageViews. I want one of them to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.