newcoder1010 Posted May 8, 2017 Share Posted May 8, 2017 Hello, I have a table. In the table, there are some rows I do not want to display. How can I hide it using CSS? These are the two rows I would like to remove. <tr> <td> <div class="form-item form-item-accounts-1 form-type-checkbox checkbox"> <label class="control-label" for="edit-accounts-1"> <span class="element-invisible"></span> <input type="checkbox" id="edit-accounts-1" name="accounts[1]" value="1" class="form-checkbox"></label> </div></td> <td> <a href="/rincon/user/1" title="View user profile." class="username" xml:lang="" about="/rincon/user/1" typeof="sioc:UserAccount" property="foaf:name" datatype="">kar2015</a></td><td>active</td> <td><ul> <li>administrator</li> </ul></td> <td>4 months 1 week</td><td>1 min 15 sec ago</td><td><a href="/rincon/user/1/edit?destination=admin/people">edit</a></td> </tr> <tr> <td> <div class="form-item form-item-accounts-454 form-type-checkbox checkbox"> <label class="control-label" for="edit-accounts-454"> <span class="element-invisible"></span><input type="checkbox" id="edit-accounts-454" name="accounts[454]" value="454" class="form-checkbox"></label> </div></td> <td><a href="/rincon/users/admin" title="View user profile." class="username" xml:lang="" about="/rincon/users/admin" typeof="sioc:UserAccount" property="foaf:name" datatype="">admin</a></td><td>active</td><td><ul> <li>administrator</li> </ul></td> <td>3 weeks 23 hours</td><td>56 min 45 sec ago</td><td><a href="/rincon/user/454/edit?destination=admin/people">edit</a></td> </tr> Link to comment Share on other sites More sharing options...
dsonesuk Posted May 8, 2017 Share Posted May 8, 2017 You need a identifier class, to target them specifically, or use nth-of-type() https://www.w3schools.com/cssref/sel_nth-of-type.asp Link to comment Share on other sites More sharing options...
Sunamena Posted May 9, 2017 Share Posted May 9, 2017 As dsonesuk sayd: you have to select them and then assign css to them. For example i have <td class="dontShow"> on my website. I do not want this cell to be seen. I have two options in CSS. .dontShow { Display: none; } Or .dontShow { Visibility: hidden; } The difference is, that display none will remove it from your webpage and the visibility will just make it not be there, but it will still take up the space as if it did exist. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now