• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 714
  • Last Modified:

TD style override

I have two styles for my table tds:

.HomeMasterPageTable td
{
   padding: 0px !important;
}

td
{
    vertical-align: top;
    padding: 3px 3px 3px 3px !important;
}

Open in new window


The first is for a table on the master page which must not have any padding. It wraps the body content throughout the site. But the body content contains tables that must have the td padding as shown above.

However, when the tables inside the master page table are rendered, they also do not have padding.

How do I tell the system that only the table with the class name of "HomeMasterPageTable " should have no padding. But every other table needs to have the padding, even if they are tables inside of the HomeMasterPageTable  table?

thanks!
0
Starr Duskk
Asked:
Starr Duskk
1 Solution
 
GaryCommented:
CSS inherits/overrides. Your code for the td is overriding the HomeMasterPageTable class, plus you declared both styles as important - remove the !important from the td class or  structure the css properly

td
{
    vertical-align: top;
    padding: 3px 3px 3px 3px;
}

.HomeMasterPageTable td
{
   padding: 0px;
}

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now