Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS Table Border, Revisited...

Posted on 2004-04-06
2
Medium Priority
?
1,135 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
[X]
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
2 Comments
 
LVL 14

Accepted Solution

by:
dfu23 earned 300 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

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

722 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