Does anybody know how I can achieve that?
Normally I ask 'why' this solution works better, but I will just accept it this time.
style="display:inline-block; width:67%; background-color:lightgrey;border-radius: 5px; padding: 5px; border: 3px solid #ccc;"
Without that, it would have done exactly the same as the <table> - as their default style is to be a block that fills 100% width.
So you could have fixed this by applying a similar custom style to the <table> - in particular: style="display: inline-block; width: 67%" would likely have done it.
But forget about it !!