EricC Posted February 5, 2016 Share Posted February 5, 2016 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: 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 Quote Link to comment Share on other sites More sharing options...
step Posted February 5, 2016 Share Posted February 5, 2016 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. 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. 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. 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.