The problem is, very simpley, that your div.table-container
contains more than just your table. If you close off that div after your table closing tag, you should see the results you are looking for.
I image that that your double opening table tags
<table><table...
Are also messing with how the HTML is being parsed. Given the part of your html that looks like this at the end of the table:
</p></table></div></div></div></div></div>
</div></div>
</div>
</div>
it looks like your IDE autofill is getting confused….
solved CSS rule affecting more than just my table [closed]