Added sorting to table columns

Added sorting to table columns. When there are multiple tables on same
page, there are some minor issues that the sorting of one table
sometimes affect sorting in another table.
Added position:relative; to canvas, because the styling of tables below
the canvas was affected by the canvas.