Indenting Tables - KB Article Question

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

Indenting Tables - KB Article Question

Postby Marc on Fri Nov 02, 2007 11:06 am

A new Knowledge Base article (http://kb.madcapsoftware.com/Content/Flare/Tables/TAB1004) describes how to indent a table by creating a subclass under Div, modifying the margin-left value, applying the new div subclass tag to an empty paragraph, and then moving each existing table into that paragraph. I am still (slowly) learning about CSS, but it makes more sense to me to just modify the margin-left value in the table style (not the tablestyle, but the style named table). That indented all of my exisiting tables with little effort - certainly less effort than touching each one of my tables. Of course, my solution affects every table in my project (which may be a problem for some, but is OK with me), but other than that, what's the benefit of indenting tables as described in the Knowledge Base?
Marc
Propeller Head
 
Posts: 27
Joined: Thu Aug 23, 2007 8:36 am
Location: King of Prussia, PA

Postby KevinDAmery on Fri Nov 02, 2007 11:11 am

The big problem I've found is that when I add a table it has inline style code that makes the indent 0. So, when I added an indent to the main stylesheet, nothing happened because the inline style took precedence. My solution has been to remove that inline style code. I'm not sure where it came from, although it could come from the predefined table styles.

Putting tables in a Div would get around this problem, as you could indent the Div and it wouldn't be affected by the inline code. But to me that seems like a convoluted solution. Like you, I prefer to just have the proper style info for the Table style itself.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
KevinDAmery
Propellus Maximus
 
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Postby Marc on Fri Nov 02, 2007 11:23 am

So I guess the larger question is: Where do these inline styles come from? They seem to appear anytime I create a table or apply a tablestyle. (I had removed all of these inline styles in an earlier exercise - that's why changing the margin-left value for the table tag worked for me).
Marc
Propeller Head
 
Posts: 27
Joined: Thu Aug 23, 2007 8:36 am
Location: King of Prussia, PA

Postby Kevin_Lin on Mon Nov 05, 2007 1:56 pm

Hello Marc,

The inline formatting that you talk about in the forum post is used to set the table alignment. If you set the table alignment property to anything other than (default), Flare will insert a margin-left property and a margin-right property to the <table> tag. For example, align-right equals to a margin-left of auto and a margin-right of 0. If you set the table alignment to (default) in the table properties menu, those inline formatting will go away.

It is very true that you will be able to indent a table by changing the margin-left value in the <table> tag. However, if you make some changes to the table alignment, the changes that you made to that margin-left property will be wiped out. The use of a <div> tag is just more consistent. It is also much more cleaner to use the <div> tag then to modify the inline formatting. So, in conclusion, it is better to indent a table using the <div> tag for now.


Thank you.
Kevin Lin
Technical Support Analyst
MadCap Software, Inc.
User avatar
Kevin_Lin
Jr. Propeller Head
 
Posts: 2
Joined: Thu Dec 15, 2005 1:30 pm
Location: San Diego, CA

Re: Indenting Tables - KB Article Question

Postby nsemple on Thu Jun 12, 2008 12:14 pm

Kevin,

Is there a way to indent a table from the interface using Flare 3.1? (rather than from the code)?

For example, I would like to select a table, right-click, and then click Table Properties from the shortcut menu. From the Table Properties dialog box that appears, I'd like to be able to set the left margin using the options on the Basic tab. (Currently, the only options are for the number of rows/columns, auto-fit behavior, table caption, etc.)
nsemple
Propeller Head
 
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 10 guests