How do I prevent border formatting from disappearing whenever I insert a table?

Hopefully the image above tells you all you need to know, but this is the inside of a textbox. I swapped out the genuine text with placeholder text so as not to distract you, but otherwise this is a very real project I'm actually working on.
So the text above appears inside a border. The text below appears inside a border. But what I actually want... I generated my desired output using photoshop, but I don't know how to replicate it into anything sensible in inDesign.

(I'll be changing the colour of the cells later anyway, so it doesn't matter if the solution preserves the transparency inside the cells or not.)
So, how do I do this?

