Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shing_shing's avatar

Table in 2nd page to display on top

I generated a pdf using dompdf stream so it's displaying now on browser which is what I really have to do to design the downloadable pdf.

I have this 2 divs: below https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_equal_height

in div1 inside col-container, I am displaying a table, so if the table height increases, so does its parent div which is div1. The div 1 is now continues on page 2 BUT the table inside div 2 jumps on to page 2 also together with div1's continuation. I would like to display it on top.

here's my problem: https://drive.google.com/open?id=1siCtVyAfjWOk5Kg_mldmdmFHDWVvLtiR

God bless us all!

0 likes
2 replies
bobbybouwmann's avatar

I don't see your HTML, but it looks like you're inside a table layout as well. If that is the case, then all content is centered horizontally by default. If you don't want that, you have to do something like this

.some-class {
    vertical-align: top;
}

It works better if you would share a jsfiddle link for example. This way we can also see how your HTML and CSS is structured.

Please or to participate in this conversation.