javascript - Two side by side divs, fluid with max width -


i have 2 side-by-side divs, in left div have text, , right div may or may not have text (if doesn't have text, have no content @ all).

if right div has text ... width of left div should expand equal width of text, 50% of width of parent div.

if right div not have text ... width of left div should expand equal width of text, 100% of width of parent div.

in either case if there text fit on 1 line of div, should wrap next line.

is possible using straight css? or have javascript solution?

thanks!

you can implement both css , whatever scripting language using populate page.

here's sudo

if right-div-content-exists     create left div style="width:50%";     create right div style="width:x%"; else             create left div style="width:100%"; 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -