In my PDF output, I need to indicate changes with a change bar and formatted text. The formatted text is easy and the change bar would be fairly straightforward if all content was positioned the same. Here is an example of the type of change I need to call out, the text added in the second column of this table:
Border Example.png
I enclose the contents of the second column in a div and apply this CSS style:
Code: Select all
div.changeBarAddedText
{
color: var(--addedTextColor);
text-decoration: underline;
margin-left: -2.82in;
padding-left: 2.82in;
border-left: 1px solid black;
}
The padding-left and margin-left place the content and the left border where I want them. Problem is of course that I have to manually figure those numbers out and they work only for that specific content in that particular location, obviously would not work for content in the first or third column. I'm pretty sure the answer is "No", but is there any way for CSS to automatically determine the horizontal position of an element such as a div at build time? I could then use calc to take that value and calculate the correct margin and padding values.
Thanks.
You do not have the required permissions to view the files attached to this post.