PHPPdf icon indicating copy to clipboard operation
PHPPdf copied to clipboard

Absolute position of an element

Open ottsch opened this issue 12 years ago • 6 comments

Is there a possibility to do something like position:absolute?

ottsch avatar Dec 11 '12 18:12 ottsch

No, there is no replacement for position: absolute. I will look closer to implement this feature soon.

psliwa avatar Dec 11 '12 18:12 psliwa

Thanks that would be great!

ottsch avatar Dec 11 '12 19:12 ottsch

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.

psliwa avatar Jan 01 '13 14:01 psliwa

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?

mjanser avatar Feb 13 '13 13:02 mjanser

It seems that absolute positioned elements are still used to compute parent element height. It should not be according to CSS behaviour.

capture d ecran 2016-05-19 a 17 38 30

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).

ambroisemaupate avatar May 19 '16 15:05 ambroisemaupate

I managed to fix this using float="left" on image container and text container. But it’s still a dirty fix.

ambroisemaupate avatar May 19 '16 17:05 ambroisemaupate