PHPPdf
PHPPdf copied to clipboard
Absolute position of an element
Is there a possibility to do something like position:absolute?
No, there is no replacement for position: absolute. I will look closer to implement this feature soon.
Thanks that would be great!
position attribute is now supported. For now the change has been made only in master branch. Backward compatibility has been broken for "ul" and "ol" tags. Those tags had "position" attribute already, so I renamed it to "list-position".
Supported values for position attribute: static (default), relative, absolute. This attribute works as same as in html. Only left and top attributes are supported, nor right and bottom.
I use the position attribute to absolutely position the main content in a dynamic-page tag. If this content breaks onto a second page, it will be positioned the same way as on the first page. Is it possible to apply the position attribute only on the first page?
It seems that absolute positioned elements are still used to compute parent element height. It should not be according to CSS behaviour.

In that screenshot, each text element is absolute inside the relative container. Height should be set against the image’s height. But the container has still the wrong height (image + texts).
I managed to fix this using float="left" on image container and text container. But it’s still a dirty fix.