p.list turns into table

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

p.list turns into table

Post by lacastle »

How does this -

Code: Select all

    <body>
        <h3>Account</h3>
        <p class="listStart" MadCap:autonum="1. ">Information - general merchant information, such as name, address, country, currency, phone number, bank account information, billing cycle, batch close time; users will see different information depending on their hierarchy</p>
        <p class="list" MadCap:autonum="2. ">Settings - view only</p>
        <p class="list" MadCap:autonum="3. ">Parameters - view only</p>
flare.png
Turn into this in webhelp output?

Code: Select all

    <body>

        <div class="MCBreadcrumbsBox"><span class="MCBreadcrumbsPrefix">You are here: </span><span class="MCBreadcrumbsSelf">webSuite User Guides</span><span class="MCBreadcrumbsDivider"> > </span><span class="MCBreadcrumbs">Navigating - Quick Reference</span>
        </div>
        <h3>Account</h3>
        <table class="AutoNumber_p_listStart" style="width: 100%; margin-left: 0;" cellspacing="0" cellpadding="0">

            <col style="width: 21px;" />
            <col style="width: 24px;" />
            <col style="width: auto;" />
            <tr>
                <td valign="top" />
                <td class="AutoNumber_p_listStart" valign="top"><span>1. </span>
                </td>
                <td class="AutoNumber_p_listStart" MadCap:autonum="1. " valign="top">Information - general merchant information, such as name, address, country, currency, phone number, bank account information, billing cycle, batch close time; users will see different information depending on their hierarchy</td>

            </tr>
        </table>
        <table class="AutoNumber_p_listStart" style="width: 100%; margin-left: 0;" cellspacing="0" cellpadding="0">
            <col style="width: 21px;" />
            <col style="width: 24px;" />
            <col style="width: auto;" />
            <tr>
                <td valign="top" />
                <td class="AutoNumber_p_listStart" valign="top"><span>2. </span>

                </td>
                <td class="AutoNumber_p_listStart" MadCap:autonum="2. " valign="top">Settings - view only</td>
            </tr>
        </table>
        <table class="AutoNumber_p_listStart" style="width: 100%; margin-left: 0;" cellspacing="0" cellpadding="0">
            <col style="width: 21px;" />
            <col style="width: 24px;" />
            <col style="width: auto;" />

            <tr>
                <td valign="top" />
                <td class="AutoNumber_p_listStart" valign="top"><span>3. </span>
                </td>
                <td class="AutoNumber_p_listStart" MadCap:autonum="3. " valign="top">Parameters - view only</td>
            </tr>
        </table>
web.png
i thought it would be a good idea to change all my ol lists to p.list (with p.listStart to reset each group to 1.). it looked really good in Flare, and was much easier than formatting ol lists.
then i ran the webhelp output and every numbered list that is now a p list has borders around it. i suspected it was a table, and the code says so.

the font is also not right. it looks like it's the default font vs. what i set in the stylesheet.

here is the css for my p.list (same for p.listStart except for the auto-number part)

Code: Select all

p.list
{
	mc-auto-number-format: '{n+}. ';
	margin: 0px;
	margin-bottom: 0px;
	padding-bottom: 3px;
	padding-left: 0px;
	text-indent: 0px;
	mc-auto-number-position: outside-head;
	mc-auto-number-offset: 24px;
	margin-left: 45px;
}
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: p.list turns into table

Post by LTinker68 »

It's the outside-head that's causing it to be created in a table. That's how Flare simulates the effect. You see borders and such because you must have set a border on your base td tag. Likewise, your td tag probably has a different font associated with it.

Try something like the following (you might have to play with the text-indent and margin-left values a bit to get what you want and depending on the font and font size you use).

Code: Select all

p.paraList
{
	mc-auto-number-format: '{n+}. ';
	text-indent: -20px;
	margin-left: 40px;
}
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: p.list turns into table

Post by lacastle »

i'll try it. thanks :D
i'm not sure why i originally did the "outside-head" setting. maybe i saw it somewhere in the forums.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: p.list turns into table

Post by lacastle »

the reason i did outside-head was because i wanted the digits in the numbers to not mess up the text (updated). how do i get the space between the decimal and text bigger? how can i get the first line of text to line up with the lines below?

the changes look ok except for the 2nd line not lining up.
new.png
You do not have the required permissions to view the files attached to this post.
Last edited by lacastle on Fri Feb 11, 2011 9:55 am, edited 1 time in total.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: p.list turns into table

Post by lacastle »

it looks like i can take away the borders from my table and td settings and it looks ok. as long as it doesn't mess up my actual tables, i'm fine. on first glance, i don't think it is because i use a table.css to format those tables. is the only reason to have table and td and tr in the regular css for people who don't use table.css?

is it a bug that a p style with outside-head autonumbering would turn into a table?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: p.list turns into table

Post by LTinker68 »

lacastle wrote:how can i get the first line of text to line up with the lines below?
That's why I said you might need to play with the text-indent and margin-left values to get the spacing you need. So increase both values.
lacastle wrote:is the only reason to have table and td and tr in the regular css for people who don't use table.css?
By default, if you have one stylesheet (e.g., Styles.css) for topics, then that's used by all topics. A table stylesheet reference is only added to a topic if you apply a table stylesheet to a table in that topic. If you don't have a table or the table doesn't use a table stylesheet, then it will use the table/tr/th/td definitions in your topic stylesheet. If you don't have anything defined for those styles in the topic stylesheet, then it'll use the default values for them.
lacastle wrote:is it a bug that a p style with outside-head autonumbering would turn into a table?
Weellllll... I think putting it in a table was MadCap's solution to having that type of numbering and formatting scheme without resorting to using HTML list tags, which would restrict the number formatting you could do and wouldn't give you the ability to cross-ref to the line item. There might be other methods they could use to get the same effect that didn't use tables (e.g., floating the auto-number format), but the table might have been the option most widely supported by all the output types available. Word, for example, doesn't support DIVs, so they couldn't use that option.

You could certainly submit a feature request asking that if you select outside-head on an auto-numbered element that Flare automatically create custom table and td tags. The table tag would have borders collapsed, no border color, and no cell padding or spacing. The td tag would have no borders, and a few other attributes that might be necessary. That way you wouldn't have to go back and change your base table/tr/th/td style definitions.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: p.list turns into table

Post by lacastle »

lacastle wrote:how can i get the first line of text to line up with the lines below?

That's why I said you might need to play with the text-indent and margin-left values to get the spacing you need. So increase both values.
i tried that, but the 2-digit numbers mess up the spacing of the first row. by using the "table" way, the margin is the same for all the text (3rd column), and there 'just so happens' to be a number offset to the left of the first row (2nd column). it makes sense looking at the table's column widths. (first 2 columns add up to 45px, which is what i had for the p margin-left. 2nd column is 24px to the left of the 3rd, which is also what i asked for.)
You could certainly submit a feature request asking that if you select outside-head on an auto-numbered element that Flare automatically create custom table and td tags. The table tag would have borders collapsed, no border color, and no cell padding or spacing. The td tag would have no borders, and a few other attributes that might be necessary. That way you wouldn't have to go back and change your base table/tr/th/td style definitions.
that's the real answer. i'm going to keep it as a table for now and go through the rest of my help to see if it messed up anything else. if it does, i'll probably have to create table or td classes for the places where i really need a table with borders. there's probably no way to set Flare to pick up a table class for p autonumbering.

thanks for your help lisa!
Post Reply