Use CSS to change spacing for <p> only where <p> appears within a table
The subject is pretty self explanatory. Basically proper classing hasn't been followed for 开发者_Go百科thousands of documents. We'd now like to change the pages' line leading, but both body text and (some) table text uses <p>
. This ends up looking weird when some table captions have the same leading as the rest of the document and some have more.
Is there any way to rescue my organization from our sloppy classing without going through our html documents with a comb to properly class things?
Maybe javascript?
You should probably use this:
table p
{
/*css properties*/
}
The relevant selector here would be
table p {
//spacing CSS here
}
table p {
/* specific rules to only p elements within a table element */
}
精彩评论