View Single Post
Old February 5th, 2016, 08:46 AM
step's Avatar
step step is offline
Senior Contributor
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 957
Default Re: Table Margin and Padding

Originally Posted by EricC View Post
In the world of CSS and HTML, the 'margin' is defined as the area OUTSIDE the box. (And 'padding' is the area inside the box).
I think what you're referencing is a div as opposed to an HTML table.

Originally Posted by EricC View Post
But according to FusionPro, the margin is the area INSIDE the box. Is this correct?
Yes, in FusionPro, the "margin" refers to the area inside the cell. In FusionPro's table object, margins are a property of a given cell not of the entire table.

Originally Posted by EricC View Post
I am adjusting my table's bottom margin like this:
myTable.Rows[0].Cells[0].Margins.Bottom = 12;
...but it's adding space inside the box, not outside as I would expect.
You are defining the bottom margin of the first cell of the first row of your table as 1.2 points (Top and Bottom margins should be entered as 10ths of a point 12px = 9pt*10 = 90 in your case). Check out page 55 of the TagsRefGuide.pdf for more information on margins as they relate to FusionPro tables.

Originally Posted by EricC View Post
So, how can I add 12px of space below my table?

(I know I can just add a blank line, but I wanted precise control of the space in pixels. A 'margin' property would do the trick ;-)
After you've created your table, I'd add an additional row without borders and use the minHeight property of the row to give it a precise height:
// .. table stuff
var row = myTable.AddRow();
row.minHeight = 90; // 9 pts = 12 px
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

Reply With Quote