AutoNumber issue - unwanted borders from td!

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
MHP
Propeller Head
Posts: 21
Joined: Mon Nov 26, 2007 8:59 am
Location: Scotland, UK

AutoNumber issue - unwanted borders from td!

Post by MHP »

In WebHelp output, my AutoNumbered* styles inherit gridlines from the td style (see below).
UnwantedGridInAutoNumberedStyle.PNG
If I switch off the borders in td, the issues goes away. However, this messes up my tables**.

Does anybody know a sensible workaround?


*I'm using AutoNumbered styles for control, and to avoid multiple mouseclicks during composition.
**I'm not using TableStylesheets because then the tables don't indent properly.
You do not have the required permissions to view the files attached to this post.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: AutoNumber issue - unwanted borders from td!

Post by alaltenburg »

How does it mess up your tables when borders are switched off? That seems to me the only fix if you turn borders off. Otherwise, it may be a bug.

Andrea
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
MHP
Propeller Head
Posts: 21
Joined: Mon Nov 26, 2007 8:59 am
Location: Scotland, UK

Re: AutoNumber issue - unwanted borders from td!

Post by MHP »

alaltenburg wrote:How does it mess up your tables when borders are switched off? That seems to me the only fix if you turn borders off.

Andrea
The borders are the internal gridlines. Not having them messes up the format and usability of the tables.

Yes, we're turning them off for now. Have already lodged a bug.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: AutoNumber issue - unwanted borders from td!

Post by LTinker68 »

MHP wrote:The borders are the internal gridlines. Not having them messes up the format and usability of the tables.

Yes, we're turning them off for now. Have already lodged a bug.
I'm still not sure what you mean that it messes up the format of the table. More than likely you want to create a complex selector, which would basically say that if this auto-number format is inside a td tag, then change its style to the following. So if your auto-number format has a bottom margin of 12px, for example, and your td tag has internal padding of 4px, then there will be 16px from the auto-number text and the bottom border in its cell, which may be way more than you want. So you need to create a complex selector similar to the followin.g p.customAutoNum is the auto-number style and the first group of styles is its normal style (showing only one attribute for clarity). The complex selector is the second style set.

Code: Select all

p.customAutoNum {
    margin-bottom:12px;
}

td p.customAutoNum {
    margin-bottom:0;
}
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
MHP
Propeller Head
Posts: 21
Joined: Mon Nov 26, 2007 8:59 am
Location: Scotland, UK

Re: AutoNumber issue - unwanted borders from td!

Post by MHP »

Just to clarify:

The paragraphs of autonumbered styles are not supposed to be inside a table!

The gridlines just appear as soon as I add borders to the td style.

The td style shouldn't affect the autonumbered styles, but it does.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: AutoNumber issue - unwanted borders from td!

Post by LTinker68 »

Check your auto-number style and see if you have its display property set to block or table. Block is the default setting for paragraphs.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
MHP
Propeller Head
Posts: 21
Joined: Mon Nov 26, 2007 8:59 am
Location: Scotland, UK

Re: AutoNumber issue - unwanted borders from td!

Post by MHP »

LTinker68 wrote:Check your auto-number style and see if you have its display property set to block or table. Block is the default setting for paragraphs.
Nice try, but alas no.

Thanks!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: AutoNumber issue - unwanted borders from td!

Post by LTinker68 »

Can you post the stylesheet code for the auto-number format and the page code of the topic where you started the auto-number format? I've never seen that behavior, so maybe there's something in the code that we'll see.

Does that happen every time you use that auto-number format, or is it just that one topic?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: AutoNumber issue - unwanted borders from td!

Post by rob hollinger »

There are a few things happening here that cause this to happen.
There is a border style applied to the <table> tag.
In WebHelp - Flare has to use tables to keep the formatting of your auto numbering styles correct because there are no tab stops in the HTML world. Thats the reason the auto-number styles received borders.
The auto number styles become table class="AutoNumber_p_myList" in the output and we import your paragraph styles into that class. The down side is the class will inherit the styles applied to the main <table> style (cascade).
These settings on the main table style will affect other items as well such as proxies and generated lists where levels of formatting are required.

The best bet is to create a style class of each style that contains the settings you want for the tables.
Apply those new classes to the table, th, tr, tbody, etc in the table and return the main styles back to border-less (default).

I have submitted a bug to development to somehow prevent this from happening.

RH
Rob Hollinger
MadCap Software
Post Reply