Solved

CSS Table Border, Revisited...

Posted on 2004-04-06
2
1,121 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
Comment Utility
table.NOborder td { border:0; border-collapse: collapse;}
0
 
LVL 2

Author Comment

by:dgooding
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now