I have a table that I'm using for a form. I need it to be able to adjust automatically to two scenarios:

• When there's no floating div to the right of the table, I want the table to take up 100% of the width.

• When there's a floating div to the right of the table, I want the table to give room for this div, and take up the remaining horizontal space.

How can I do this?