formatting bullets

This forum is for all Flare issues related to styles, stylesheets and XML.

formatting bullets

Postby livetoski on Tue Apr 29, 2008 9:19 am

I am still totally baffled by the relationship between the table style and the project css. I really wish I didn't have to apply the style umpteen times to each cell. If it's a certain kind of table and I have formatted the cell, why does it lose the table format each time I apply a style from the list and then lose the style I just formatted each time I reapply the table style (padding etc).

What am I doing wrong?
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: formatting bullets

Postby 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?

Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Master Propellus Maximus
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: formatting bullets

Postby Dave Lee on Tue Apr 29, 2008 4:33 pm

There isn't much detail here, but from your other post I noticed you'd set up the td style in your main styelsheet.

Setting table styles in your main stylesheet will work fine for tables that do not use a table stylesheet.
However, when you apply a table style, you're reformatting the table using the table stylesheet, which override the styles in your main stylesheet.

In a table that doesn't use a table stylesheet, each cell in the table that has a td tag will use that style in your main stylesheet.
In a table that with a table style applied, the cell will be set to a class of td, e.g. td.TableStyle_Normal_Body_0_0_RowSep_ColSep.

So whatever is set in the table stylesheet is overriding the formatting you set for td (or any classes of it) in your main stylesheet.
Dave Lee
Master Propellus Maximus
Posts: 5884
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 5 guests