Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

CSS - hid fourth row in table?

Posted on 2014-03-17
Last Modified: 2014-03-17
can anyone tell how to hide the Brokers link in the table below using CSS?


      <div align="center">
        <table width="768"  height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#990000">
            <td width="96" class="navcell"><a href="index.php" class="nav">
            <font color="#D0C96C"><span style="display: block">Home</span></font></a></td>
            <td width="96" class="navcell"><a href="businesses-type-all-state-NSW.htm" class="nav">
            <font color="#D0C96C"><span style="display: block">Sydney</span></font></a></td>
            <td width="96" class="navcell"><a href="businesses-type-all-state-QLD.htm" class="nav">
            <font color="#D0C96C"><span style="display: block">Brisbane</span></font></a></td>
            <td width="96" class="navcell"><a href="brokers.php" class="nav"> 
            <font color="#D0C96C"><span style="display: block">Brokers</span></font></a></td>
            <td width="96" class="navcell"><a href="services.php" class="nav"> 
            <font color="#D0C96C"><span style="display: block">Services</span></font></a></td>
            <td width="96" class="navcell"><a href="contact.php" class="nav">
            <font color="#D0C96C"><span style="display: block">Contact</span></font></a></td>
            <td width="96" class="navcell"><a href="disclaimer.php" class="nav">
            <font color="#D0C96C"><span style="display: block">Disclaimer</span></font></a></td>

Open in new window

Question by:sabecs
  • 3
  • 3
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 39935670
i dont know why your styles are inline, but if you want an inline style, apply this rule to whatever element you want to hide


Author Comment

ID: 39935682
Thanks for your help, much appreciated.

It's an old website and the above table is in hundreds of files, I was after a quick way to add something to a common CSS file to hide the  4th row, is this possible?

I don't want to spend time removing from hundreds of files as site will be updated shortly, my customer wants one page removed urgently.
LVL 38

Expert Comment

by:Tom Beck
ID: 39935683
With css you could do this:

.navcell a[href='brokers.php'] {
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.


Author Comment

ID: 39935685
Thanks Tom, that is almost perfect, is there a way to change the width to 0 as  <td width="96" is still taking up space?
LVL 38

Accepted Solution

Tom Beck earned 500 total points
ID: 39935687
You could hide the whole td if it's always the fourth td as long as there is only one row in the table.

.navcell:nth-of-type(4) {

Older versions of IE will have trouble with this.
LVL 38

Expert Comment

by:Tom Beck
ID: 39935699
As a way to handle IE less than v9 you could add both rules.

.navcell a[href='brokers.php'] {

.navcell:nth-of-type(4) {

Then at least the link will be gone in older IE versions (though the td will still take up space).

Author Closing Comment

ID: 39935700
Thanks Tom, that is perfect.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change of column alignment in div 2 23
forgetful about js objects 8 46
How do I limit a simple jqModal Pop-Up to show only once per session? 2 6
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

808 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