by LTinker68 on Tue Apr 29, 2008 11:16 am
Just remember that the guy who's closest wins. Closest to the text, that is. When you first create a topic, the main (project) stylesheet is added as a reference to the topic. At this point, it's the only thing that's controlling the styles on the page. If you create a table, but don't specify a table stylesheet, then the table uses the styles in the main stylesheet. If you create a table and specify a table stylesheet, then a reference to the table stylesheet is added to the topic, but it's listed below the main stylesheet, which puts the table stylesheet closest to the text. If there is a style specified for a tag in the table stylesheet (e.g., <td>), then the style in the table stylesheet takes precedence over the same tag (in this case, <td>) in the main stylesheet. However, if a style is not specified in the table stylesheet but is specified in the main stylesheet, then that style is the one used. The style from the table stylesheet can be overridden, however, if you apply an inline style to a specific cell.
Here's an example... Say in the main stylesheet you have the <td> style set to have a background of blue. In the table stylesheet you've specified that the table has row colors that alternate between red and white. If you create a new topic and insert a table without an associated table stylesheet, then the table cells will have a blue background. If you then apply the table stylesheet to that table, then the rows will switch from all blue to alternating between red and white. If you then select the text in a cell and apply a background color of green, then only that cell will have a green background, because the inline style overrides the table stylesheet which has overridden the main stylesheet.
What's most likely happening in your case is that you have values specified for the same styles in both the main stylesheet and the table stylesheet. When you select text (or a cell) and select a style from the main stylesheet, then you're applying inline styles. When you reselect the table styles, however, you're applying another set of inline styles, but they're even closer to the text so they take precedence. If you open the topic in the Internal Text Editor and look at the code in the table, you'll probably see a whole lot of inline styles.
Does that help?
LisaEagles may soar, but weasels aren't sucked into jet engines.Warning! Loose nut behind the keyboard.