You are here: DEVPPL Forum Programming CSS Forum
NOTIFICATIONS
54.124
MEMBERS
15.697
TOPICS
62.285
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

Side by side DIV tags - dynamically changing

0

Loading

Side by side DIV tags - dynamically changing

Postby Kdjuiopo » Fri Jul 29, 2011 11:10 am

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...
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

Login to get rid of ads

 

0

Loading

Re: Side by side DIV tags - dynamically changing

Postby Rajmv » Sat Jul 30, 2011 5:45 am

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=='').
Rajmv
 
Reputation: 0
Posts: 103
Joined: Thu Jul 14, 2011 8:22 am
Highscores: 0
Arcade winning challenges: 0
^ Back to Top