alt text

Hi i am facing issue with css. This is my css class applied to outer tabel it works fine but it apply to inner table also. This issue occurs in all browser.

Table.GridOne {
    border-collapse: collapse;
Table.GridOne td {
    padding:3px 2px 5px 2px;
    border:1px solid #ff9900;
    border-collapse: collapse;
Table.GridOne Th {

2 answers

o.k.w 2355

Have another css style to hide the inner table cell border:

Table.GridOne table td {
    border: none;
Answered about 8 years ago by o.k.w

The CSS you've declared states that it will apply to ALL table tags with the class GridOne. The second and third selectors will match all tds and ths within all matches for table.GridOne.

The quickest solution to this problem is to remove the GridOne class from your inner table. If you need that class to remain, then you can override the rules you've already declared by adding rules like o.k.w. suggested.

His suggested selector of table.GridOne table td will only match tds that are inside of a table that is already inside table.GridOne.

The W3C's chapter on Selectors in the CSS2 spec is a great resource!

Answered about 8 years ago by Scott Cranfill