MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   Tables & Charts (http://forums.pti.com/forumdisplay.php?f=36)
-   -   Table Margin and Padding (http://forums.pti.com/showthread.php?t=4471)

EricC February 5th, 2016 07:02 AM

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.screencast.com/t/06nAFfFThttp://www.w3schools.com/css/css_boxmodel.asp


http://screencast.com/t/06nAFfFT

step February 5th, 2016 08:46 AM

Re: Table Margin and Padding
 
Quote:

Originally Posted by EricC (Post 18143)
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 (Post 18143)
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 (Post 18143)
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 (Post 18143)
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



All times are GMT -7. The time now is 08:23 PM.

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