EDIT POST First Post Mark as Spam kdjuiopo
Posts: 90 - Registered: 2011-06-30 20:32:13
I have side by side div tags - each container is 300px wide. Sometimes both containers are filled - other times only the left container - this happens dynamically and i don't have control of this.
So, I would like to have the left container center itself with the 600px area when the right container is empty. Any ideas?
I have tried changing the floats, but cannot seem to get it to work. Thanks in advance for your ideas...
EDIT POST Reply #1 Mark as Spam rajmv
Posts: 103 - Registered: 2011-07-14 02:22:09
This could be in <body onload="checkContent()">.
That js checks if the right div is empty, and adjusts the left div's .style.left if the right div is empty (rightdiv.innerHTML=='').