| You are here: DEVPPL ‹ Forum ‹ Programming ‹ CSS Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
Side by side DIV tags - dynamically changing
2 posts
• Page 1 of 1
0
Side by side DIV tags - dynamically changing
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...
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...
- Kdjuiopo
- Reputation: 0
- Posts: 90
- Joined: Fri Jul 01, 2011 2:32 am
- Highscores: 0
- Arcade winning challenges: 0
Side by side DIV tags - dynamically changing - Sponsored results
- Sponsored results
0
Re: Side by side DIV tags - dynamically changing
Yes, you call a javascript function after you update the content of your content divs.
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=='').
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=='').
- Rajmv
- Reputation: 0
- Posts: 103
- Joined: Thu Jul 14, 2011 8:22 am
- Highscores: 0
- Arcade winning challenges: 0
|
|