Click to See Complete Forum and Search --> : Nested style problem


elmu
08-09-2006, 08:36 AM
Hello

I'm using a Joomla CMS where a css defined for the td tag inside content_tabe is:

table.content_table td {
padding: 0px;
margin: 0px;
}

In some cases - eg. if I have a table inside the main table - I want to set padding to 10.

I made the css:

table.content_table.my_table td {
padding: 10px;
border: 3px solid #159;
}

Unfortunately it doesn't work. The border is displayed but it ignores the padding.
What should I change?

Thanks!

Juparis
08-09-2006, 10:36 AM
In you second code sample--is that two classes I see?
"table.content_table.my_table"

Using "table.content_table table" will set the attributes for any table inside the first .content_table. If this ".my_table" is the class of the nested table, it should be "table.content_table table.my_table" or even just "table.my_table"

At least I think that's what you're after. If I'm wrong, just try to specefy what you need.

ray326
08-09-2006, 09:42 PM
table.my_table td {
padding: 10px;
border: 3px solid #159;
}

Then <table class="content_table my_table">