Solved

CSS Table Border, Revisited...

Posted on 2004-04-06
2
1,133 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 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

734 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