openhtmltopdf icon indicating copy to clipboard operation
openhtmltopdf copied to clipboard

about the question of the style that is ”position: absolute“

Open pipti opened this issue 3 years ago • 4 comments

when the page content is not full,be half or less,for example <div style="position:absolute ;bottom:10px"></div>,the style "position:absolute ;bottom:10px" does not good work,then the div's position is relative the bottom content position.

pipti avatar May 07 '21 04:05 pipti

I met the same problem, while using <div style="position:absolute ;left:85;top:120>. It does not work. The html file shows correctly on chrome. Is there any way to solve it ?

yanweitong avatar May 27 '21 09:05 yanweitong

@pipti - The div's position is relative to the end of the html element (or the parent layer), but I can see why it would be useful to position content relative to the last page bottom. Got any suggestions for syntax?

@yanweitong - You just need to use units such as px. Browsers are a lot more forgiving than this project. <div style="position:absolute ;left:85px;top:120px>. Although, you may have got a warning in your logs.

danfickle avatar May 29 '21 12:05 danfickle

I appreciate you answer,i understand that

pipti avatar Jun 04 '21 03:06 pipti

Hi, Have you any solution for this case? i have same problem with postion absolute :((

DoHue97 avatar Mar 03 '23 04:03 DoHue97