I want the DIVS en TABLES to adjust in width when advertisements are shown. The text after the advertisements needs to be shown on the whole page and because of that, my problem occurs. As you can see the DIV and TABLE continious underneath the advertisement.

As explained in example 3. It can't be checked on the height of table 1. Because it's possible that it takes 3tables to reach the end of the advertisement and the 4th table starts width the full width.

And on another day it's possible that table3 starts under the advertisement

As explained in example 3. It can't be checked on the height of table 1. Because it's possible that it takes 3tables to reach the end of the advertisement and the 4th table starts width the full width.

And on another day it's possible that table3 starts under the advertisement

Click to expand...

Shish, how many tables are you using? Might want to look into some tableless solutions as they are more flexible for things like this.

Any ways, since you are working with an unknown number of tables and the height of these is unknown, it makes things really difficult. I am sure their is a way to dynamically figure out the height of each table, but that is beyond me at the moment. Like I said above, a tableless solution would be more flexible and easier to work with here. Your simplest bet might be to switch to a vertical ad block.

Just create an id for a table with the ad, and another for one below the ad. ZKiller will probably explain more if you need it

Click to expand...

Hmmm... I see what you are saying and this was my thought initially as well, but you would still have the same problem while trying to apply the appropriate width to multiple tables. If each table had a fixed height, this would be as simple as pie.

Ok, I did a little research for your - Google is my friend. Their isn't any proven way to get the table height before it has been rendered by the browser. However, this shouldn't be a problem. With the help of a Javascript library such as jQuery you can get the height of a element once rendered.

So, placing something along the lines of the following code at the end of the content section should work.