Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Tables & Charts

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 5th, 2016, 08:02 AM
EricC EricC is offline
Regular Contributor
 
Join Date: Nov 2008
Posts: 87
Question Table Margin and Padding

I created a table using FusionPro.
The table has a border on all 4 sides.

Below the table, I want to add 12px of margin.

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).

But according to FusionPro, the margin is the area INSIDE the box. Is this correct?

I am adjusting my table's bottom margin like this:
Code:
myTable.Rows[0].Cells[0].Margins.Bottom = 12;
...but it's adding space inside the box, not outside as I would expect.

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 ;-)



The CSS Box Model
http://www.w3schools.com/css/css_boxmodel.asp


__________________
--
Eric Carbone
IT/Project Manager, MOR Printing Inc.

Windows 10 |Adobe Acrobat XI | FusionPro 9
Reply With Quote
  #2  
Old February 5th, 2016, 09:46 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Table Margin and Padding

Quote:
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.

Quote:
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.

Quote:
Originally Posted by EricC View Post
I am adjusting my table's bottom margin like this:
Code:
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.

Quote:
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:
Code:
// .. 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

LinkedIn
Reply With Quote
Reply

Tags
margin, padding, table

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.