I have a PDF output document that contains a two-column table. I want borders between the rows in the second column, but not the first. Right now I'm applying a td style to the cells in the second column that specify the border parameters. This works OK but it would be nice if it was more automatic. I can't see any way to use a Table Style to do this as I can only specify borders/separators for the whole row. It would also be useful if the border was not applied if the row goes across a page break. I just want a border only between the rows, not within the rows.
Thanks!
Top and bottom borders in just one column of a table?
-
- Sr. Propeller Head
- Posts: 277
- Joined: Fri Feb 13, 2015 8:25 am
- Location: Germany
Re: Top and bottom borders in just one column of a table?
Hello,
if you look at a table style you may find columns. If you only have one column in your style you may add a second one and specify its seperator.
if you look at a table style you may find columns. If you only have one column in your style you may add a second one and specify its seperator.
You do not have the required permissions to view the files attached to this post.
Kind regards,
Sabine Kamprowski
DocToHelp MVP (by ComponentOne)
Sabine Kamprowski
DocToHelp MVP (by ComponentOne)
Re: Top and bottom borders in just one column of a table?
Thanks for the suggestion but the column separators are vertical, not horizontal, so they separate one column from another, not the rows in a single column.
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Top and bottom borders in just one column of a table?
You may be able to create a custom row, which puts borders on all columns except the first?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Top and bottom borders in just one column of a table?
You can't do this using table stylesheet, as you can only format a whole row or a whole column.
You could do it using some CSS, for example this will add a red bottom border to cells in the 3rd column:
Adjust TestTable to your table style name (which has a class name like .TableStyle-TestTable), and set the column number in nth-child(3).
You could do it using some CSS, for example this will add a red bottom border to cells in the 3rd column:
Code: Select all
table.TableStyle-TestTable tr td:nth-child(3)
{
border-bottom: 1px solid red;
}
Re: Top and bottom borders in just one column of a table?
Thanks, Dave, that's a pretty cool solution. I gave it a try and unfortunately it doesn't quite work in my situation. First, I have tables inside the main table and the CSS puts puts borders on the (in my case) second column of the enclosed tables as well. I can probably fix that with a bit more CSS, though. Second, if a cell crosses a page break, the border is placed at the bottom of the page, as well as at the actual bottom of the cell, dividing the cell where I don't want it to be divided.
Re: Top and bottom borders in just one column of a table?
And ignore that last problem, where the border is added to the cell when cell goes across a page break. I just realized what the "Hide bottom ruling when table crosses a page break:" setting in the Table Properties does.
Re: Top and bottom borders in just one column of a table?
Yes, just make the CSS more specific.rjplano wrote:Thanks, Dave, that's a pretty cool solution. I gave it a try and unfortunately it doesn't quite work in my situation. First, I have tables inside the main table and the CSS puts puts borders on the (in my case) second column of the enclosed tables as well. I can probably fix that with a bit more CSS, though. Second, if a cell crosses a page break, the border is placed at the bottom of the page, as well as at the actual bottom of the cell, dividing the cell where I don't want it to be divided.
Code: Select all
table.TableStyle-TestTable > tbody > tr > td:nth-child(3)
Re: Top and bottom borders in just one column of a table?
Thanks Dave! I'll give that a try, see if it solves all my border issues.