GroceryCRUD布局

I was about to ask about the problem I'm facing while making web using CodeIgniter and GroceryCRUD as extended library.

I'm using this $output (same way as gcrud zip package's examples.php) to display the table.

Then I put $output in the middle of my web page (after some header) in a wrapper (a [div]) with no value/definition of height in its style (css). I also put a [footer] after (outside) the wrapper div with (the [footer]'s) position:relative;.

The problem is, if my table (generated with $output) is longer than the screen, my footer is just placed in the bottom of the screen, while the table is actually longer than screen (window).

Then, when I scrolling down, the footer is stayed in the middle of my table's wrapper, instead of placed in the end, after the div wrapper of $output table, just look like it was stacked purposely in the middle of wrapper div.

All I want is to place the footer right after the wrapper div.

You have any idea? Thanks in advance.

Ps. I was wondering if it's because of the table is rendered after the footer. The footer is placed before the table finished (as it assume the wrapper div is empty). So the footer is stacked at top of the table. So, is it possible if we can order the parse of layout? (Javascript). I'm barely know js, or almost nothing I know at all.

Try to use CSS and adjust the position of the footer using CSS function padding and margin.