Solved

CSS Table Border, Revisited...

Posted on 2004-04-06
2
1,131 Views
Last Modified: 2012-05-05
Please refer to http://www.experts-exchange.com/Web/Q_20944285.html for initial information.

It turns out that I will need to use tables elsewhere on my site.  And those tables should have "no border" like the outer table.  However, the following CSS:
  table table, table table td { border:1px solid #000; border-collapse: collapse;}
affects ALL interior tables.  Is there a way to make a table have a class that also affects the td's inside it?

So that

  <table class=border>
    <tr>
      <td></td><td></td>
    </tr>
  </table>

would have exterior and interior borders and

  <table class=NOborder>
    <tr>
      <td></td><td></td>
    </tr>
  </table>

would not?  I really don't want to have to use "class=" on every td inside the table (there's plenty).
0
Comment
Question by:dgooding
2 Comments
 
LVL 14

Accepted Solution

by:
dfu23 earned 75 total points
ID: 10766353
table.NOborder td { border:0; border-collapse: collapse;}
0
 
LVL 2

Author Comment

by:dgooding
ID: 10766451
Thanks dfu23.  Quick easy points.  This is what I've decided to use, with your help...

  table.border { border:1px solid #000; border-collapse: collapse;}
  table.border td { border:1px solid #000; border-collapse: collapse;}
  table.noborder { border:0; border-collapse: collapse;}
  table.noborder td { border:0; border-collapse: collapse;}
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

828 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